{"id":45187682,"url":"https://github.com/bitcomplete/remix-oauth2-lite","last_synced_at":"2026-02-20T11:04:24.713Z","repository":{"id":58033964,"uuid":"529250799","full_name":"bitcomplete/remix-oauth2-lite","owner":"bitcomplete","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-23T17:52:20.000Z","size":100,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-30T17:17:17.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/bitcomplete.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-26T12:35:01.000Z","updated_at":"2022-08-26T14:42:36.000Z","dependencies_parsed_at":"2023-02-09T16:46:30.946Z","dependency_job_id":null,"html_url":"https://github.com/bitcomplete/remix-oauth2-lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitcomplete/remix-oauth2-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcomplete%2Fremix-oauth2-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcomplete%2Fremix-oauth2-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcomplete%2Fremix-oauth2-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcomplete%2Fremix-oauth2-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcomplete","download_url":"https://codeload.github.com/bitcomplete/remix-oauth2-lite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcomplete%2Fremix-oauth2-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29648480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2026-02-20T11:04:24.097Z","updated_at":"2026-02-20T11:04:24.708Z","avatar_url":"https://github.com/bitcomplete.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"remix-oauth2-lite is an authentication and authorization library for the Remix\nweb framework. It supports some OAuth2 providers out of the box, and offers a\nsimple API for authorization in a Remix app.\n\n# Quick start\n\n① Create session storage and an Auth object:\n\n```\nimport { createCookieSessionStorage } from \"remix\";\nimport { Auth } from \"remix-oauth2-lite\";\n\n// ~/lib/auth.server.tsx\nconst sessionStorage = createCookieSessionStorage({\n  cookie: {\n    name: \"my-site-session\",\n    sameSite: \"lax\",\n    path: \"/\",\n    httpOnly: true,\n    secrets: [SESSION_SECRET],\n    secure: process.env.NODE_ENV === \"production\",\n  },\n});\n\nexport const auth = new Auth(sessionStorage, [\n  // providers here...\n  // See the Providers section below for more details.\n]);\n```\n\n② Create a splat route to handle auth endpoints:\n\n```\n// routes/auth/$.tsx\nimport { LoaderFunction } from \"@remix-run/server-runtime\";\nimport { auth } from \"~/services/auth.server\";\n\nexport const loader: LoaderFunction = async (args) =\u003e auth.loader(args);\n\nexport default function () {\n  return null;\n}\n```\n\n③ Authenticate requests on routes that should be protected:\n\n```\n// routes/someroute.tsx\nexport let loader: LoaderFunction = async ({ request }) =\u003e {\n  return await auth.authenticated(request, async (user) =\u003e {\n    // Logged out users will be redirect to \"/\".\n    return json({ user })\n  });\n};\n```\n\n④ Direct users to provider-specific sign-in/sign-out links:\n\n```\n// Sign in link for myprovider\n\u003cLink to=\"/auth/someprovider/login\"\u003eSign In\u003c/Link\u003e\n\n// Sign out link for myprovider\n\u003cLink to=\"/auth/someprovider/logout\"\u003eSign Out\u003c/Link\u003e\n```\n\n# Providers\n\nMost authentication logic is specific to a provider, each of which is described\nbelow.\n\n## Google\n\n```\nexport const auth = new Auth(sessionStorage, [\n  new GoogleProvider({\n    clientId: CLIENT_ID,\n    clientSecret: CLIENT_SECRET,\n    scope: \"email\"\n  }),\n]);\n```\n\n## Generic OAuth2\n\n```\nexport const auth = new Auth(sessionStorage, [\n  new OAuth2Provider({\n    authorizationUrl: `https://some-provider.com/oauth2/authorize`,\n    tokenUrl: `https://some-provider.com/oauth2/token`,\n    clientId: CLIENT_ID,\n    clientSecret: CLIENT_SECRET,\n  }),\n]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcomplete%2Fremix-oauth2-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcomplete%2Fremix-oauth2-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcomplete%2Fremix-oauth2-lite/lists"}