From 15f87129c84dc77b92b87ff140467355c81b8eaa Mon Sep 17 00:00:00 2001 From: Remo Blaser Date: Tue, 11 Nov 2025 14:29:48 +0100 Subject: [PATCH] fix: add fallback if userInfo.sub is not available --- src/core/protocols/oauth/oauth2_callback.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/protocols/oauth/oauth2_callback.ts b/src/core/protocols/oauth/oauth2_callback.ts index 521a637..2199793 100644 --- a/src/core/protocols/oauth/oauth2_callback.ts +++ b/src/core/protocols/oauth/oauth2_callback.ts @@ -81,7 +81,7 @@ export async function OAuth2Callback( const userData = { email: userInfo.email, name: userInfo.name ?? "", - sub: userInfo.sub, + sub: userInfo.sub ?? userInfo.id, scope: providerConfig.scope, issuer: providerConfig.authorization_server.issuer, picture: userInfo.picture ?? "",