Moved defence against null tokens into defaultProfileTransform to apply more broadly than just Microsoft tokens.

Signed-off-by: Alex Crome <afscrome@users.noreply.github.com>
This commit is contained in:
Alex Crome
2024-02-19 15:07:42 +00:00
parent 8d77d00733
commit a0b01eda2c
3 changed files with 4 additions and 12 deletions
@@ -57,7 +57,7 @@ export class PassportOAuthAuthenticatorHelper {
OAuthAuthenticatorResult<PassportProfile>
> = async input => ({
profile: PassportHelpers.transformProfile(
input.fullProfile,
input.fullProfile ?? {},
input.session.idToken,
),
});