Skip to content
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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Feat/seedless onboarding #2

wants to merge 13 commits into from

Conversation

lwin-kyaw
Copy link

Explanation

References

Changelog

@metamask/package-a

  • : Your change here
  • : Your change here

@metamask/package-b

  • : Your change here
  • : Your change here

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

* @returns A promise that resolves to the authentication result.
*/
async authenticateOAuthUser(params: AuthenticateUserParams) {
const verificationResult = await this.#toprfAuthClient.authenticate(params);
Copy link

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

Copy link
Author

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.

Copy link
Author

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: {
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants