-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/seedless refresh token #18
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
himanshuchawla009
left a comment
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.
- Skip lock usage comment should improved
- Incorrect comment on skip lock, currently it mentions about aggregate verifier.
- rename
doAuthenticatetodoAuthenticateWithNodes - Incorrect jsdocs for passwordd field on
createToprfKeyAndBackupSeedPhrasefunction refreshTokenerror is incorrect inassertIsAuthenticatedUserassertIsAuthenticatedUserdoesn’t check for expiry of node auth tokens.- I think we should refresh tokens proactively meaning we should first check if node auth tokens are expired on client side thn thn refresh instead of just relying on 401 from server, 401 should be the fallback
assertIsAuthenticatedUsershould be moved insidewithControllerLockcallback so that it can prevent doing multiple refresh tokens when token expires parallely for more thn 1 call.
| * The refresh token used to refresh expired nodeAuthTokens. | ||
| * This is temporarily stored in state during authentication and then persisted in the vault. | ||
| */ | ||
| refreshToken?: 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.
i think we can't persist refresh token in the vault as it can be used even before wallet is unlocked, only revokeToken should be in vault
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.
@himanshuchawla009 oh this one is in state, not the vault
the vault data type is in
/**
* The structure of the data which is serialized and stored in the vault.
*/
export type VaultData = {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.
ah need to fix the code comment, comment says its persisted in vault
packages/seedless-onboarding-controller/src/SeedlessOnboardingController.ts
Show resolved
Hide resolved
packages/seedless-onboarding-controller/src/SeedlessOnboardingController.ts
Show resolved
Hide resolved
packages/seedless-onboarding-controller/src/SeedlessOnboardingController.ts
Outdated
Show resolved
Hide resolved
himanshuchawla009
left a comment
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.
lgtm
Explanation
Add refresh token and revoke refresh token handling to SeedlessOnboardingController
References
Changelog
Checklist