{"id":51405284,"url":"https://github.com/alyldas/uniauth-drizzle","last_synced_at":"2026-07-04T10:31:41.712Z","repository":{"id":360698045,"uuid":"1250377760","full_name":"alyldas/uniauth-drizzle","owner":"alyldas","description":"Drizzle/Postgres persistence adapter for UniAuth core contracts.","archived":false,"fork":false,"pushed_at":"2026-05-27T14:13:17.000Z","size":51,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T15:05:07.634Z","etag":null,"topics":["adapter","auth","authentication","drizzle","postgres","typescript","uniauth"],"latest_commit_sha":null,"homepage":"https://github.com/alyldas/uniauth-drizzle#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:12:41.000Z","updated_at":"2026-05-27T14:14:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alyldas/uniauth-drizzle","commit_stats":null,"previous_names":["alyldas/uniauth-drizzle"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/alyldas/uniauth-drizzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-drizzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-drizzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-drizzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-drizzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alyldas","download_url":"https://codeload.github.com/alyldas/uniauth-drizzle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alyldas%2Funiauth-drizzle/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":["adapter","auth","authentication","drizzle","postgres","typescript","uniauth"],"created_at":"2026-07-04T10:31:41.463Z","updated_at":"2026-07-04T10:31:41.698Z","avatar_url":"https://github.com/alyldas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UniAuth Drizzle Adapter\n\n[![GitHub Packages](https://img.shields.io/static/v1?label=GitHub%20Packages\u0026message=%40alyldas%2Funiauth-drizzle\u0026color=24292f\u0026logo=github)](https://github.com/users/alyldas/packages/npm/package/uniauth-drizzle)\n\nDrizzle storage adapter for `@alyldas/uniauth-core`.\n\nThis package implements only the UniAuth storage contracts:\n\n- `AuthServiceRepositories`;\n- `UnitOfWork`;\n- PostgreSQL tables for Drizzle.\n\nIt does not verify passwords, issue sessions, parse HTTP requests, send OTP messages, or duplicate\nauth policy logic from `@alyldas/uniauth-core`.\n\n## Runtime Boundary\n\nApplications own Drizzle driver setup, connection lifecycle, migrations, retry policy, and database\noperations outside the UniAuth repository contracts. This package owns only table definitions,\nrepository implementations, and transaction wiring for UniAuth.\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```sh\nnpm install @alyldas/uniauth-core @alyldas/uniauth-drizzle drizzle-orm\n```\n\n## Usage\n\n```ts\nimport { DefaultAuthService } from '@alyldas/uniauth-core'\nimport { createDrizzleAuthStore } from '@alyldas/uniauth-drizzle'\nimport { drizzle } from 'drizzle-orm/node-postgres'\nimport { Pool } from 'pg'\n\nconst db = drizzle(new Pool({ connectionString: process.env.DATABASE_URL }))\nconst store = createDrizzleAuthStore({ db })\n\nconst auth = new DefaultAuthService({\n  repos: store,\n  transaction: store,\n})\n```\n\nUse the exported Drizzle tables in migrations:\n\n```ts\nimport {\n  uniauthAuditEvents,\n  uniauthCredentials,\n  uniauthIdentities,\n  uniauthSessions,\n  uniauthUsers,\n  uniauthVerifications,\n} from '@alyldas/uniauth-drizzle'\n```\n\nSee [Postgres persistence](docs/postgres.md) for the schema parity notes, transaction boundary, and\nruntime ownership split.\n\n## Security Notes\n\n- Verification secrets and session tokens must reach this adapter already hashed by UniAuth core.\n- Metadata and trust payloads are stored as JSON, but provider SDK objects should be reduced before\n  they reach UniAuth.\n- The adapter does not infer account ownership outside UniAuth policy.\n\n## Local Checks\n\n```sh\nnpm run check\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyldas%2Funiauth-drizzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falyldas%2Funiauth-drizzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyldas%2Funiauth-drizzle/lists"}