{"library":"strange-auth","title":"strange-auth","type":"library","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.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install strange-auth"],"cli":null},"imports":["const { makeReducer } = require('strange-auth')","const { makeActions } = require('strange-auth')","const { types } = require('strange-auth')","const { statuses } = require('strange-auth')","const StrangeAuth = require('strange-auth')"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/BigRoomStudios/strange-auth","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/strange-auth","openapi_spec":null,"status_page":null,"smithery":null},"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}