-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/seedless onboarding #2
base: main
Are you sure you want to change the base?
Conversation
* @returns A promise that resolves to the authentication result. | ||
*/ | ||
async authenticateOAuthUser(params: AuthenticateUserParams) { | ||
const verificationResult = await this.#toprfAuthClient.authenticate(params); |
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.
Shouldn't the controller store the verificationResult ( AuthToken ) in the controller state?
the createSeedPhrase and other function will not need the authToken params.
the app also do not need to find place to store the AuthToken
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.
Yes, agree. They should be stored in SeedlessControllerState
.
I have not added them into state yet, coz the toprf-sdk interfaces are not ready yet.
I will push new commits for that soon.
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.
added state in here, 56a2f7f
export const defaultState: SeedlessOnboardingControllerState = {}; | ||
const seedlessOnboardingMetadata: StateMetadata<SeedlessOnboardingControllerState> = | ||
{ | ||
nodeAuthTokens: { |
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.
Should allow the seedless onboarding controller's constructor to set the initial state
export getDefaultSeedlessOnboardingControllerState that return this default state
Explanation
References
Changelog
@metamask/package-a
@metamask/package-b
Checklist