{"id":44312106,"url":"https://github.com/fells-code/seamless-auth-react","last_synced_at":"2026-04-23T23:05:29.615Z","repository":{"id":259641699,"uuid":"848612842","full_name":"fells-code/seamless-auth-react","owner":"fells-code","description":"The Seamless Auth React frontend SDK, allowing quick integration with seamless auth instances","archived":false,"fork":false,"pushed_at":"2026-04-23T15:53:21.000Z","size":1031,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-23T17:34:01.991Z","etag":null,"topics":["passwordless","passwordless-authentication","passwordless-login","seamlessauth"],"latest_commit_sha":null,"homepage":"https://seamlessauth.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fells-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-28T04:45:39.000Z","updated_at":"2026-04-23T15:53:24.000Z","dependencies_parsed_at":"2025-04-19T21:44:25.927Z","dependency_job_id":"19cc88a0-046f-4e6f-8be5-ffc70f42b4af","html_url":"https://github.com/fells-code/seamless-auth-react","commit_stats":null,"previous_names":["fells-code/drop-auth","fells-code/seamless-auth-react"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/fells-code/seamless-auth-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fells-code%2Fseamless-auth-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fells-code%2Fseamless-auth-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fells-code%2Fseamless-auth-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fells-code%2Fseamless-auth-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fells-code","download_url":"https://codeload.github.com/fells-code/seamless-auth-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fells-code%2Fseamless-auth-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32201871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T20:19:26.138Z","status":"ssl_error","status_checked_at":"2026-04-23T20:19:23.520Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["passwordless","passwordless-authentication","passwordless-login","seamlessauth"],"created_at":"2026-02-11T04:12:30.593Z","updated_at":"2026-04-23T23:05:28.869Z","avatar_url":"https://github.com/fells-code.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Seamless Auth React\n\n# @seamless-auth/react\n\n[![npm version](https://img.shields.io/npm/v/@seamless-auth/react.svg?label=%40seamless-auth%2Freact)](https://www.npmjs.com/package/@seamless-auth/react)\n[![build](https://github.com/fells-code/seamless-auth-react/actions/workflows/release.yml/badge.svg)](https://github.com/fells-code/seamless-auth-react/actions/workflows/release.yml)\n[![coverage](https://img.shields.io/codecov/c/github/fells-code/seamless-auth-react)](https://app.codecov.io/gh/fells-code/seamless-auth-react)\n[![license](https://img.shields.io/github/license/fells-code/seamless-auth-react)](./LICENSE)\n\nA drop-in authentication provider for React applications, designed to handle login, multi-factor authentication, passkeys, and user session validation using your own backend.\n\n## Features\n\n- Provides `AuthProvider` context\n- Includes `useAuth()` hook for access to auth state and actions\n- Ships with pre-built login, MFA, and passkey routes\n- Lets consumer apps handle routing via `react-router-dom`\n- Supports automatic session validation on load\n\n---\n\n## Installation\n\n```bash\nnpm install seamless-auth-react\n```\n\n---\n\n## Usage\n\n### 1. Wrap your app with `AuthProvider`\n\n```tsx\nimport { AuthProvider } from 'seamless-auth-react';\nimport { BrowserRouter } from 'react-router-dom';\n\n\u003cBrowserRouter\u003e\n  \u003cAuthProvider apiHost=\"https://your.api/\"\u003e\n    \u003cAppRoutes /\u003e\n  \u003c/AuthProvider\u003e\n\u003c/BrowserRouter\u003e;\n```\n\n### 2. Use `useAuth()` to access auth state\n\n```tsx\nimport { useAuth } from 'seamless-auth-react';\n\nconst Dashboard = () =\u003e {\n  const { user, logout } = useAuth();\n  return (\n    \u003cdiv\u003e\n      Welcome, {user?.email}\n      \u003cbutton onClick={logout}\u003eLogout\u003c/button\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\n### 3. Use `\u003cAuthRoutes /\u003e` for handling login/mfa/passkey screens\n\n```tsx\nimport { Routes, Route } from 'react-router-dom';\nimport { useAuth, AuthRoutes } from 'seamless-auth-react';\n\nconst AppRoutes = () =\u003e {\n  const { isAuthenticated } = useAuth();\n\n  return (\n    \u003cRoutes\u003e\n      {isAuthenticated ? (\n        \u003cRoute path=\"*\" element={\u003cDashboard /\u003e} /\u003e\n      ) : (\n        \u003cRoute path=\"*\" element={\u003cAuthRoutes /\u003e} /\u003e\n      )}\n    \u003c/Routes\u003e\n  );\n};\n```\n\n\u003e Note: You are responsible for handling route protection and redirects based on `isAuthenticated`.\n\n---\n\n## AuthContext API\n\n### `useAuth()` returns:\n\n```ts\n{\n  user: { email: string, roles?: string[] } | null;\n  isAuthenticated: boolean;\n  logout(): Promise\u003cvoid\u003e;\n  deleteUser(): Promise\u003cvoid\u003e;\n  hasRole(role: string): boolean | undefined;\n}\n```\n\n---\n\n## Auth Routes Included\n\n- `/login`\n- `/mfaLogin`\n- `/passKeyLogin`\n- `/registerPasskey`\n- `/verifyOTP`\n\nEach route includes a pre-built UI and expects your backend to expose compatible endpoints.\n\n---\n\n## Customization\n\nYou can override the included UI screens by:\n\n- Copying the component source from the package\n- Creating your own version\n- Replacing the component in your app\n\n---\n\n## Notes\n\n- This package **does not** create its own `\u003cBrowserRouter\u003e` or `\u003cRoutes\u003e`.\n- It is designed to be fully compatible with your existing routing tree.\n- The `AuthProvider` automatically calls `/users/me` on load to validate session.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffells-code%2Fseamless-auth-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffells-code%2Fseamless-auth-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffells-code%2Fseamless-auth-react/lists"}