Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Add ability to optionally store credentials for re-auth #239

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

nategbrown9
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Nov 6, 2023

Unit Test Results

  39 files    39 suites   30s ⏱️
  87 tests   87 ✔️ 0 💤 0
133 runs  133 ✔️ 0 💤 0

Results for commit 9c2ba08.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Erin-Mounts Erin-Mounts left a 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) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

@syoung-smallwisdom syoung-smallwisdom left a 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.

@nategbrown9 nategbrown9 merged commit f43763e into main Nov 7, 2023
3 checks passed
@nategbrown9 nategbrown9 deleted the nbrown/add-reauth-with-creds branch November 7, 2023 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants