mirror of
https://github.com/hanzoai/id.git
synced 2026-10-26 20:59:52 +00:00
Prep social login end-to-end so only OAuth-app registration + KMS creds remain.
- The hop (social.ts/startProviderLogin): redirects straight to GitHub/Google with a base64 state that round-trips the original authorize request — the Casdoor getAuthUrl contract. Replaces the @hanzo/iam signinRedirect that looped back to the login page. Pure URL builder is unit-tested (social.test.ts, 5 cases).
- SocialButtons now keeps the full provider records (type/clientId/scopes surfaced from get-app-login) and routes OAuth providers through the hop, wallet through the SDK.
- Callback gained a GATED provider-return branch: a provider state (base64 with provider+application) is exchanged via client.providerLogin at the IAM backend, then follows the continue-URL back into the normal OIDC path. The existing OIDC/password path is the untouched else-branch — and the social branch is unreachable until a configured provider exists, so zero impact today.
- Cred-sync already exists (init_data.json ${IAM_GITHUB_CLIENT_ID} <- iam-kms-sync KMSSecret, project hanzo-iam/prod). Runbook in LLM.md. End-to-end needs live verification once real creds are seeded.
35 lines
880 B
JSON
35 lines
880 B
JSON
{
|
|
"name": "@hanzo/id-auth",
|
|
"version": "0.1.0",
|
|
"description": "Composable login / signup / OTP / OAuth-PKCE flows on top of @hanzo/iam. UI primitives in @hanzo/gui.",
|
|
"license": "BSD-3-Clause",
|
|
"type": "module",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./client": "./src/client.ts",
|
|
"./forms": "./src/ui/index.ts",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": ["src"],
|
|
"scripts": {
|
|
"tc": "tsc --noEmit",
|
|
"test": "node --test --experimental-strip-types 'src/**/*.test.ts'"
|
|
},
|
|
"dependencies": {
|
|
"@hanzo/id-shared": "workspace:*",
|
|
"@hanzo/iam": "^0.11.0"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=19",
|
|
"react-dom": ">=19"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^19.0.0",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|