{"id":15687429,"url":"https://github.com/r17x/react-auth","last_synced_at":"2025-05-07T19:45:31.277Z","repository":{"id":96096945,"uuid":"509854839","full_name":"r17x/react-auth","owner":"r17x","description":"🚧 Unpublished/Undistributed - Still Work in Progress","archived":false,"fork":false,"pushed_at":"2022-09-17T16:43:39.000Z","size":130,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T13:28:25.264Z","etag":null,"topics":["client","javascript","jwt","nodejs","server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r17x.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-02T20:25:19.000Z","updated_at":"2023-06-01T16:34:21.000Z","dependencies_parsed_at":"2023-03-06T19:00:19.242Z","dependency_job_id":null,"html_url":"https://github.com/r17x/react-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/r17x%2Freact-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Freact-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Freact-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r17x%2Freact-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r17x","download_url":"https://codeload.github.com/r17x/react-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252947519,"owners_count":21829995,"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":["client","javascript","jwt","nodejs","server"],"created_at":"2024-10-03T17:48:24.123Z","updated_at":"2025-05-07T19:45:31.253Z","avatar_url":"https://github.com/r17x.png","language":"JavaScript","readme":"# Feature\n* JWT Support\n\n# Usage\n\n## Install\n\n### Yarn\n```console\nyarn add react-auths\n```\n\n### NPM\n```console\nnpm install --save react-auths\n```\n\n### Register `Provider`\n```javascript\n// file: index.js\nimport { AuthProvider } from 'react-auths'\n\nexport default function EntryPoint(){\n  return (\n    \u003cAuthProvider storageType=\"local\" authType=\"JWT\"\u003e\n      \u003cComponent /\u003e\n      ...\n    \u003c/AuthProvider\u003e\n  )\n}\n```\n\n### Consume `Auth` states or actions\n```javascript\nimport { useAuth } from 'react-auths'\n\nconst Login = () =\u003e {\n  const { signIn } = useAuth()\n  const token = 'accessToken'\n\n  return (\n    \u003cdiv\u003e\n      \u003cOtherCommponent/\u003e\n      \u003cbutton onClick={ () =\u003e signIn(token) } /\u003e\n    \u003c/div\u003e\n  )\n}\n```\n# API\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr17x%2Freact-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr17x%2Freact-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr17x%2Freact-auth/lists"}