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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃敺 Implement /create-account route #16

Open
1 task done
Tracked by #192
esaminu opened this issue Jul 13, 2023 · 5 comments 路 Fixed by #24
Open
1 task done
Tracked by #192

馃敺 Implement /create-account route #16

esaminu opened this issue Jul 13, 2023 · 5 comments 路 Fixed by #24
Assignees
Labels
Emerging Tech Emerging Tech flying formation at Pagoda Epic Milestone or collection of like issues Near BOS NEAR BOS team at Pagoda

Comments

@esaminu
Copy link
Collaborator

esaminu commented Jul 13, 2023

Move the implementation on near.org/signup into the signer app /create-account route

In the new signing flow, near.org will popup the fast-auth-signer when the user clicks Create Account.

The route should take optional publicKey and redirectUrl query params.

At that point if there is no account on the signer app:

  1. Collect the user's email address and accountId
  2. Generate a keypair for the user on webauthn using the email address (same as currently done on near.org)
  3. Send a firebase auth link to the user's email with the publicKey from the webauthn keypair, accountId, publicKey from query params and redirectUrl as query params on the firebase redirect
  4. Call new-account on the recovery service when the user comes back to the signer (no longer in iframe) adding the webauthn publicKey to the account as a FAK and the publicKey on the initial query param as a LAK that calls socialdb.
  5. redirect to the redirectUrl with the publicKey and accountId

Tasks

  1. product design
    nall-near
@esaminu esaminu changed the title Move the implementation on near.org/signup into the signer app Implement /create-account route Jul 13, 2023
@hcho112
Copy link
Collaborator

hcho112 commented Jul 27, 2023

@esaminu @volovyks Is above steps need to be updated with recent changes on recovery service?
There is no notion of claim_oidc_token step.

@esaminu
Copy link
Collaborator Author

esaminu commented Aug 5, 2023

@hcho112 yes this will be done on the second iteration of the signer app

@hcho112
Copy link
Collaborator

hcho112 commented Aug 6, 2023

hmm if it happens on second iteration, #12 will be postponed as well.
I have implemented half of the process and I can only proceed to next step of implementation if create account flow is using latest end point from recovery service

@esaminu
Copy link
Collaborator Author

esaminu commented Aug 7, 2023

@hcho112 Persisting the addition of a new device via create-account or add-device to firestore should be independent of how that device was added no?

@hcho112
Copy link
Collaborator

hcho112 commented Aug 8, 2023

@esaminu adding/listing/removing firebase collection was already done on my PR. (branch I made)

However, what we actually want is to be able to:

  1. List devices (And any keys that are NOT recovery key)
  2. Upon deletion, it doesn't only delete firebase collection, but it should also delete the selected keys

To do so, create account need to use the latest endpoint from mpc recovery. (It only then register recovery key to indexer) which I'm blocked at right now.

recall from our previous communication, your feedback was:

Can you add another branch on top of this to fetch the user鈥檚 keys and key from mpc service and associate it with the keys in firestore?

So I was trying to get the whole flow working properly..

@amirsaran3 amirsaran3 linked a pull request Aug 14, 2023 that will close this issue
@trechriron trechriron added Emerging Tech Emerging Tech flying formation at Pagoda Near BOS NEAR BOS team at Pagoda Epic Milestone or collection of like issues labels Sep 7, 2023
@trechriron trechriron changed the title Implement /create-account route 馃敺 Implement /create-account route Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emerging Tech Emerging Tech flying formation at Pagoda Epic Milestone or collection of like issues Near BOS NEAR BOS team at Pagoda
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants