mirror of
https://github.com/hanzoai/id.git
synced 2026-10-30 14:57:39 +00:00
The provider hop sent redirect_uri=${origin}/callback (= hanzo.id/callback),
which the shared Google/GitHub OAuth client does NOT accept — verified live the
Google client accepts ONLY https://iam.hanzo.ai/callback (every other URI →
redirect_uri_mismatch). It also used the invalid authorize endpoint
accounts.google.com/signin/oauth.
- social.ts: Google endpoint → https://accounts.google.com/o/oauth2/v2/auth
(canonical/stable); add callbackOrigin param to buildProviderAuthUrl/
startProviderLogin (defaults to origin — local/single-host unchanged).
- TenantConfig.oauthCallbackOrigin (catalog-driven; defaults to publicOrigin);
SocialButtons passes it so the hop returns to the provider's REGISTERED
/callback. iam.hanzo.ai serves the same @hanzo/id SPA: the headless Callback
completes the exchange and forwards to the originating app.
- tests: lock the registered-callback override + canonical Google endpoint.
bump id 0.1.1→0.1.22, id-auth/id-shared 0.1.0→0.1.1
35 lines
880 B
JSON
35 lines
880 B
JSON
{
|
|
"name": "@hanzo/id-auth",
|
|
"version": "0.1.1",
|
|
"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"
|
|
}
|
|
}
|