diff --git a/authentik/sources/oauth/types/oidc.py b/authentik/sources/oauth/types/oidc.py index b6794fae87..97cfb43d49 100644 --- a/authentik/sources/oauth/types/oidc.py +++ b/authentik/sources/oauth/types/oidc.py @@ -67,7 +67,7 @@ class OpenIDConnectOAuth2Callback(OAuthCallback): client_class = OpenIDConnectClient def get_user_id(self, info: dict[str, str]) -> str: - return info.get("sub", None) + return str(info.get("sub") or info.get("id")) @registry.register()