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

Add relayer functionality to fastauth #162

Merged
merged 12 commits into from
Apr 28, 2023
Merged

Add relayer functionality to fastauth #162

merged 12 commits into from
Apr 28, 2023

Conversation

MaximusHaximus
Copy link
Contributor

@MaximusHaximus MaximusHaximus commented Apr 28, 2023

  • Updates recovery service API calls to match advanced account API
  • Implements near-social LAK-only functionality for fastauth accounts
  • Adds relayer awareness to fastauth implementation
  • Bumps NAJ to 2.1.3
  • Bumps wallet-selector to latest versions

@vercel
Copy link

vercel bot commented Apr 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
near-discovery ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2023 2:53am

try {
if (
!accountCreationData.limitedAccessKey ||
!accountCreationData.isCreated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be missing something here, but shouldn't this be:

Suggested change
!accountCreationData.isCreated
accountCreationData.isCreated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is a bit counter-intuitive -- after creating the account via recovery service, we redirect to the app after setting a flag indicating that the account was created successfully -- so this is correct, if the account wasn't created we can't yet fire the signIn() logic here

isRecovery ? "Recovering account..." : "Creating account..."
);

// TODO: Call MPC Service with accountId, publicKey, and oauthToken to create account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this TODO done?

};

await fetch(
`${MPC_RECOVERY_URL}/${isRecovery ? "add_key" : "new_account"}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think add_key supports CreateAccountOptions. Do you need us to add it?

@itegulov itegulov merged commit 5ab4c5d into testnet Apr 28, 2023
@itegulov itegulov deleted the relayer branch April 28, 2023 03:14
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.

4 participants