You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the LocalUserMapper will fail if provided an idToken and if the callback find_by_cognito_attribute on the UserRepository returned nil.
This is because the gem is trying to fetch the CognitoUser using the token as an accessToken to provide it as input of the after_local_user_not_found callback.
The text was updated successfully, but these errors were encountered:
Prevent the call to Cognito and returned an error before hand. We can check if the token passed is an idToken by looking at the token_use attribute on it.
Maybe we should change the input of the callback after_local_user_not_found to accept a PORO representing the user because the id token is supposed to contain all user attributes and such object could be hydrated without having to call Cognito.
malkovro
changed the title
LocalUserMapper
LocalUserMapper throwing an exception when given IdToken representing unknown local user
Nov 27, 2020
Issue
Currently the LocalUserMapper will fail if provided an idToken and if the callback
find_by_cognito_attribute
on the UserRepository returned nil.This is because the gem is trying to fetch the CognitoUser using the token as an accessToken to provide it as input of the
after_local_user_not_found
callback.The text was updated successfully, but these errors were encountered: