-
Notifications
You must be signed in to change notification settings - Fork 6
Add ability to optionally store credentials for re-auth #239
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, otherwise looks good
@@ -192,6 +193,21 @@ class AuthenticationRepository( | |||
return signIn(signIn) | |||
} | |||
|
|||
private fun storeCredentials(password: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're only storing/retrieving the password and not the account-identifying credential (id, email, etc)? What am I missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reauthWithCredentials method uses the currently cached user session to get email or externalID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reauthWithCredentials
method is an existing method intended to restore the session token without striping the participant's data. In other words, it will only attempt to reauthenticate against the current email/externalId.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with one question - I might have missed it, but should clear credentials on logout.
No description provided.