mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
fix(twitch): derive emailVerified from email presence
Twitch's Helix GET /users response has no email_verified field, so the provider previously hardcoded emailVerified: true. That's fine when an email is returned (Twitch only surfaces verified addresses), but the email field can be absent — producing a nonsensical emailVerified: true alongside a null email. Set emailVerified to !!userInfo.email so verified status tracks the actual presence of a verified email.
This commit is contained in:
parent
f89b97bc54
commit
a30b221c5b
@ -40,7 +40,7 @@ export class TwitchProvider extends OAuthBaseProvider {
|
||||
displayName: userInfo.display_name,
|
||||
email: userInfo.email,
|
||||
profileImageUrl: userInfo.profile_image_url,
|
||||
emailVerified: true,
|
||||
emailVerified: !!userInfo.email,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user