Registry / auth-security / strange-auth

strange-auth

JSON →
library1.0.0jsnpmunverified

A Redux-based authentication toolkit by strangeluv, version 1.0.0. It provides factory functions for creating auth reducers and actions, managing login/logout status, credentials, artifacts, and errors. Targets Redux 3.x and redux-thunk 2.x. No recent updates; likely maintenance-only.

npm install strange-auth
INSTALL
IMPORT
SIG · STRANGE-AUTH
S
strange-auth
auth-securityjavascriptv1.0.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

makeReducer
✓ const { makeReducer } = require('strange-auth')
✗ const StrangeAuth = require('strange-auth'); const reducer = StrangeAuth.makeReducer; // okay but default import not used
CommonJS only; no ESM exports.
makeActions
✓ const { makeActions } = require('strange-auth')
✗ const StrangeAuth = require('strange-auth'); const actions = StrangeAuth.makeActions; // okay
Use named import via destructuring or direct property access.
types
✓ const { types } = require('strange-auth')
✗ import { types } from 'strange-auth' // ESM not supported
Not available as ES module; use require.
statuses
✓ const { statuses } = require('strange-auth')
✗ const statuses = require('strange-auth').statuses; // okay
Import via require; statuses object contains constants like WAITING.
default import
✓ const StrangeAuth = require('strange-auth')
✗ import StrangeAuth from 'strange-auth' // ESM not supported
Library is CJS-only; default require gives the module object.

Shows how to create a store with strange-auth reducer, define actions with a mock login, and import types/statuses.

const { createStore, combineReducers } = require('redux'); const { makeReducer, makeActions, types, statuses } = require('strange-auth'); const { connect } = require('react-redux'); const authReducer = makeReducer(); const rootReducer = combineReducers({ auth: authReducer }); const store = createStore(rootReducer); const authActions = makeActions({ login: (username, password, cb) => { setTimeout(() => { if (username === 'user' && password === 'pass') { cb(null, { credentials: { token: 'abc' }, artifacts: {} }); } else { cb(new Error('Invalid credentials')); } }, 100); } }); console.log(types); // { LOGIN_ATTEMPT: ..., LOGIN_SUCCESS: ..., LOGIN_FAILURE: ..., LOGOUT_ATTEMPT: ..., LOGOUT_SUCCESS: ..., LOGOUT_FAILURE: ... } console.log(statuses.WAITING); // 'WAITING'
Debug
Known issues
breakingRequires Redux 3.x and redux-thunk 2.x as peer dependencies; incompatible with Redux 4+ or newer thunk versions.
fix
Downgrade to Redux 3.x and redux-thunk 2.x, or find an alternative library.
affects: 1.0.0
deprecatedNo updates since 2016; likely unmaintained. Not compatible with modern Redux patterns (e.g., Redux Toolkit).
fix
Consider migrating to Redux Toolkit or a modern auth library.
affects: 1.0.0
gotchamakeActions expects a callback-style or promise-returning login/logout function; using async/await incorrectly may break.
fix
Ensure returned value is a promise or call the callback with (error, result).
affects: 1.0.0
gotchaStatus constants are accessed via statuses.WAITING; string literal 'WAITING' may cause silent failures if misspelled.
fix
Always import statuses object and use its properties.
affects: 1.0.0
Errors
Common errors & fixes
Cannot find module 'redux-thunk'
Missing redux-thunk peer dependency
fix
Run: npm install redux-thunk@2.x
Uncaught TypeError: makeActions is not a function
Using import instead of require in a CJS-only environment
fix
Use const { makeActions } = require('strange-auth') instead of import.
Error: Invalid credentials (or custom error)
Login function implementation error
fix
Ensure the callback is called with (null, { credentials, artifacts }) on success, or (error) on failure.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
reduxrequiredpeer dependency for store management
redux-thunkrequiredpeer dependency for async actions
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
strange-auth — npm install strange-auth · libregistry