{"id":51405281,"url":"https://github.com/alyldas/uniauth-authjs-bridge","last_synced_at":"2026-07-04T10:31:41.575Z","repository":{"id":360736280,"uuid":"1250378202","full_name":"alyldas/uniauth-authjs-bridge","owner":"alyldas","description":"Auth.js bridge helpers for UniAuth provider sign-in assertions.","archived":false,"fork":false,"pushed_at":"2026-05-27T18:07:57.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T18:16:48.725Z","etag":null,"topics":["auth","authentication","authjs","bridge","oauth","typescript","uniauth"],"latest_commit_sha":null,"homepage":"https://github.com/alyldas/uniauth-authjs-bridge#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alyldas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-26T15:13:13.000Z","updated_at":"2026-05-27T18:08:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alyldas/uniauth-authjs-bridge","commit_stats":null,"previous_names":["alyldas/uniauth-authjs-bridge"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alyldas/uniauth-authjs-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-authjs-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-authjs-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-authjs-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-authjs-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alyldas","download_url":"https://codeload.github.com/alyldas/uniauth-authjs-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-authjs-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35118970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["auth","authentication","authjs","bridge","oauth","typescript","uniauth"],"created_at":"2026-07-04T10:31:41.121Z","updated_at":"2026-07-04T10:31:41.570Z","avatar_url":"https://github.com/alyldas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UniAuth Auth.js Bridge\n\n[![GitHub Packages](https://img.shields.io/static/v1?label=GitHub%20Packages\u0026message=%40alyldas%2Funiauth-authjs-bridge\u0026color=24292f\u0026logo=github)](https://github.com/users/alyldas/packages/npm/package/uniauth-authjs-bridge)\n\n`@alyldas/uniauth-authjs-bridge` maps Auth.js OAuth/OIDC account and profile data into a UniAuth\n`ProviderIdentityAssertion`.\n\n## Runtime Boundary\n\nThis package does not own Auth.js setup, routes, callbacks, cookies, framework sessions, token\nstorage, token refresh, or provider SDK runtime. Use it only after Auth.js has already validated the\nprovider response.\n\n## Install\n\nConfigure the GitHub Packages registry for the package scope before installing:\n\n```ini\n@alyldas:registry=https://npm.pkg.github.com\n```\n\nGitHub Packages can require authentication for package reads. Use a token with `read:packages` in local npm config or CI secrets; do not commit tokens.\n\n```bash\nnpm install @alyldas/uniauth-core @alyldas/uniauth-authjs-bridge\n```\n\n## Usage\n\n```ts\nimport { mapAuthJsOAuthToAssertion } from '@alyldas/uniauth-authjs-bridge'\n\nconst assertion = mapAuthJsOAuthToAssertion({\n  providerId: 'google-workspace',\n  account: {\n    provider: account.provider,\n    providerAccountId: account.providerAccountId,\n    type: account.type,\n  },\n  profile: profile\n    ? {\n        sub: profile.sub,\n        id: profile.id,\n        name: profile.name,\n        email: profile.email,\n        email_verified: profile.email_verified,\n        phone_number: profile.phone_number,\n        phone_number_verified: profile.phone_number_verified,\n        preferred_username: profile.preferred_username,\n        picture: profile.picture,\n        locale: profile.locale,\n      }\n    : undefined,\n  user: user\n    ? {\n        name: user.name ?? undefined,\n        email: user.email ?? undefined,\n        image: user.image ?? undefined,\n      }\n    : undefined,\n  metadata: {\n    tenantId,\n  },\n})\n\nawait auth.public.provider.signIn({ assertion })\n```\n\n`providerAccountId` is treated as the exact provider identity key. If the profile subject disagrees\nwith it, the helper rejects the input.\n\nPass `providerId` when the UniAuth provider namespace should differ from the Auth.js provider id.\nThe original Auth.js provider id is then kept as `metadata.frameworkProviderId`.\n\n## Security Notes\n\n- Do not pass raw Auth.js account, profile, token, request, or session objects as metadata.\n- Access tokens, refresh tokens, and ID tokens are never copied by this bridge.\n- Token storage remains application-owned.\n- UniAuth policy invariants still apply after mapping.\n\n## Local Checks\n\n```bash\nnpm run check\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyldas%2Funiauth-authjs-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falyldas%2Funiauth-authjs-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyldas%2Funiauth-authjs-bridge/lists"}