{"id":18827,"library":"strange-auth","title":"strange-auth","description":"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.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/BigRoomStudios/strange-auth","tags":["javascript","redux","auth","authentication","strangeluv"],"install":[{"cmd":"npm install strange-auth","lang":"bash","label":"npm"},{"cmd":"yarn add strange-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add strange-auth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for store management","package":"redux","optional":false},{"reason":"peer dependency for async actions","package":"redux-thunk","optional":false}],"imports":[{"note":"CommonJS only; no ESM exports.","wrong":"const StrangeAuth = require('strange-auth'); const reducer = StrangeAuth.makeReducer; // okay but default import not used","symbol":"makeReducer","correct":"const { makeReducer } = require('strange-auth')"},{"note":"Use named import via destructuring or direct property access.","wrong":"const StrangeAuth = require('strange-auth'); const actions = StrangeAuth.makeActions; // okay","symbol":"makeActions","correct":"const { makeActions } = require('strange-auth')"},{"note":"Not available as ES module; use require.","wrong":"import { types } from 'strange-auth' // ESM not supported","symbol":"types","correct":"const { types } = require('strange-auth')"},{"note":"Import via require; statuses object contains constants like WAITING.","wrong":"const statuses = require('strange-auth').statuses; // okay","symbol":"statuses","correct":"const { statuses } = require('strange-auth')"},{"note":"Library is CJS-only; default require gives the module object.","wrong":"import StrangeAuth from 'strange-auth' // ESM not supported","symbol":"default import","correct":"const StrangeAuth = require('strange-auth')"}],"quickstart":{"code":"const { createStore, combineReducers } = require('redux');\nconst { makeReducer, makeActions, types, statuses } = require('strange-auth');\nconst { connect } = require('react-redux');\n\nconst authReducer = makeReducer();\nconst rootReducer = combineReducers({ auth: authReducer });\nconst store = createStore(rootReducer);\n\nconst authActions = makeActions({\n  login: (username, password, cb) => {\n    setTimeout(() => {\n      if (username === 'user' && password === 'pass') {\n        cb(null, { credentials: { token: 'abc' }, artifacts: {} });\n      } else {\n        cb(new Error('Invalid credentials'));\n      }\n    }, 100);\n  }\n});\n\nconsole.log(types); // { LOGIN_ATTEMPT: ..., LOGIN_SUCCESS: ..., LOGIN_FAILURE: ..., LOGOUT_ATTEMPT: ..., LOGOUT_SUCCESS: ..., LOGOUT_FAILURE: ... }\nconsole.log(statuses.WAITING); // 'WAITING'","lang":"javascript","description":"Shows how to create a store with strange-auth reducer, define actions with a mock login, and import types/statuses."},"warnings":[{"fix":"Downgrade to Redux 3.x and redux-thunk 2.x, or find an alternative library.","message":"Requires Redux 3.x and redux-thunk 2.x as peer dependencies; incompatible with Redux 4+ or newer thunk versions.","severity":"breaking","affected_versions":"1.0.0"},{"fix":"Consider migrating to Redux Toolkit or a modern auth library.","message":"No updates since 2016; likely unmaintained. Not compatible with modern Redux patterns (e.g., Redux Toolkit).","severity":"deprecated","affected_versions":"1.0.0"},{"fix":"Ensure returned value is a promise or call the callback with (error, result).","message":"makeActions expects a callback-style or promise-returning login/logout function; using async/await incorrectly may break.","severity":"gotcha","affected_versions":"1.0.0"},{"fix":"Always import statuses object and use its properties.","message":"Status constants are accessed via statuses.WAITING; string literal 'WAITING' may cause silent failures if misspelled.","severity":"gotcha","affected_versions":"1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install redux-thunk@2.x","cause":"Missing redux-thunk peer dependency","error":"Cannot find module 'redux-thunk'"},{"fix":"Use const { makeActions } = require('strange-auth') instead of import.","cause":"Using import instead of require in a CJS-only environment","error":"Uncaught TypeError: makeActions is not a function"},{"fix":"Ensure the callback is called with (null, { credentials, artifacts }) on success, or (error) on failure.","cause":"Login function implementation error","error":"Error: Invalid credentials (or custom error)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}