{"id":20821562,"url":"https://github.com/gragland/fake-auth","last_synced_at":"2025-10-23T19:38:26.030Z","repository":{"id":47993430,"uuid":"196894152","full_name":"gragland/fake-auth","owner":"gragland","description":"A fake auth service for prototyping authentication flows","archived":false,"fork":false,"pushed_at":"2023-01-04T21:54:49.000Z","size":351,"stargazers_count":68,"open_issues_count":8,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T22:05:51.862Z","etag":null,"topics":["authentication","javascript","prototyping"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gragland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-14T23:43:18.000Z","updated_at":"2025-02-06T16:45:41.000Z","dependencies_parsed_at":"2023-02-02T21:17:03.879Z","dependency_job_id":null,"html_url":"https://github.com/gragland/fake-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gragland%2Ffake-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gragland%2Ffake-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gragland%2Ffake-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gragland%2Ffake-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gragland","download_url":"https://codeload.github.com/gragland/fake-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252913724,"owners_count":21824240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","javascript","prototyping"],"created_at":"2024-11-17T22:12:32.315Z","updated_at":"2025-10-23T19:38:20.986Z","avatar_url":"https://github.com/gragland.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔐 Fake Auth\r\n\r\nA fake auth service for prototyping authentication flows and error states. It currently supports signin, signup, signinWithProvider (google, fb, etc), password resetting, updating email, updating profile data, and subscribing to auth state changes.\r\n\r\nEverything is client-side, including the \"database\" which is stored in local storage. Perfect for quick prototyping or theme developers who'd like to have a demo site without needing to setup a backend.\r\n\r\n# Install\r\n\r\n```\r\nnpm install fake-auth --save\r\n```\r\n\r\n# Usage\r\n\r\nA simple example with React\r\n\r\n```jsx\r\nimport React, { useState } from \"react\";\r\nimport fakeAuth from \"fake-auth\";\r\n\r\nfunction SigninComponent(props) {\r\n  const [error, setError] = useState();\r\n\r\n  const handleSubmit = (email, pass) =\u003e {\r\n    fakeAuth\r\n      .signin(email, pass)\r\n      .then((response) =\u003e {\r\n        props.onSignin(response.user);\r\n      })\r\n      .catch((error) =\u003e {\r\n        setError(error);\r\n      });\r\n  };\r\n\r\n  return (\r\n    \u003cform\r\n      onSubmit={(event) =\u003e {\r\n        const [email, pass] = event.target.children;\r\n        handleSubmit(email, pass);\r\n      }}\r\n    \u003e\r\n      {error \u0026\u0026 \u003cp\u003e{error.message}\u003c/p\u003e}\r\n      \u003cinput type=\"email\" name=\"email\" /\u003e\r\n      \u003cinput type=\"password\" name=\"pass\" /\u003e\r\n    \u003c/form\u003e\r\n  );\r\n}\r\n```\r\n\r\n# Methods\r\n\r\n- `signup(email, pass).then((response) =\u003e ...)`\r\n- `signin(email, pass).then((response) =\u003e ...)`\r\n- `signinWithProvider(provider).then((response) =\u003e ...)`\r\n- `signout().then(() =\u003e ...)`\r\n- `onChange((response) =\u003e ...)`\r\n- `sendPasswordResetEmail(email).then(() =\u003e ...)`\r\n- `confirmPasswordReset(email, code).then(() =\u003e ...)`\r\n- `updateEmail(email).then(() =\u003e ...)`\r\n- `updatePassword(pass).then(() =\u003e ...)`\r\n- `updateProfile(data).then(() =\u003e ...)`\r\n- `getCurrentUser().then((user) =\u003e ...)`\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgragland%2Ffake-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgragland%2Ffake-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgragland%2Ffake-auth/lists"}