Create a stable OAuth integration shell for buyer and merchant sign-in.
Current status: publish-ready scaffold. Keep flows explicit and deterministic before full SSO hardening.
app/integrations/oauth/google_client.py
app/interfaces/api/auth_routes.py
app/application/services/session_service.py
app/protocol/identity/user_identity_mapper.py
GET /auth/google/start builds state + redirect URL.
GET /auth/google/callback validates state and exchanges code.
upsert_identity(provider, provider_user_id, email) returns internal principal id.
create_session(principal_id) returns short-lived access token and refresh token.
state and nonce against server-side cache.
runtime/src/integrations/oauth/google-oauth-service.js
runtime/tests and npm test in runtime/.
共 1 个版本