-
-
Notifications
You must be signed in to change notification settings - Fork 231
Feat/seedless refresh token #5917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: himanshuchawla009 <[email protected]>
…Controller.ts Co-authored-by: himanshuchawla009 <[email protected]>
…Controller.ts Co-authored-by: himanshuchawla009 <[email protected]>
…Controller.ts Co-authored-by: himanshuchawla009 <[email protected]>
…Controller.ts Co-authored-by: himanshuchawla009 <[email protected]>
…Mask/core into feat/seedless-onboarding-controller
@@ -109,6 +116,14 @@ const seedlessOnboardingMetadata: StateMetadata<SeedlessOnboardingControllerStat | |||
persist: true, | |||
anonymous: true, | |||
}, | |||
refreshToken: { | |||
persist: true, |
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.
I don't think we should store the refreshToken
in plain text
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.
Can this go inside the vault? We can decrypt and get it whenever we want.
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.
@lwin-kyaw after discussing with @himanshuchawla009 we decided to go with this refresh token + revoke token approach since the checkIsPasswordOutdated
call need to be checked when app is locked (vault is locked) so we need refreshToken
outside vault
revokeToken
is inside the vault and will be used to revoke refreshToken
for new one (invalidate the old one) after user unlock the app
persist: true, | ||
anonymous: true, | ||
}, | ||
revokeToken: { |
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.
Can this go inside the vault, too?
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.
@lwin-kyaw this is only temporarily stored in state (not persisted) for subsequent call to store in vault createToprfKeyAndBackupSeedPhrase
, fetchAllSeedPhrases
after authenticate
it's also cleared from temp state when app locked
Explanation
Add refresh token and revoke refresh token handling to SeedlessOnboardingController
References
Changelog
Checklist