-
Notifications
You must be signed in to change notification settings - Fork 8
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
16 implement create account route #24
Conversation
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.
Thanks for your efforts here @amirsaran3 -- nice progress. I've added notes/comments throughout -- some stuff needs to be 🔪 since it was near-discovery specific, and we can clean up some of the logic in a few places as we migrate it over.
email, | ||
...(accountId ? { accountId } : {}), | ||
...(isRecovery ? { isRecovery: 'true' } : {}), | ||
...(success_url ? { success_url } : {}), |
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.
Rather than separate URL for success and failure, let's use a single variablecallback_url
to represent the URL to redirect to in either the success or failure case, but include the result in its own URL parameter result
as 'success'|'fail'
.
If result
is set to fail
, we will include reason
as an additional parameter which will include some information about the error/failure countered.
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.
@MaximusHaximus can this interface change be pushed forward? I'm currently using almost a duplicate of WalletConnection
from NAJ to interface with the signer app from dapps and would prefer to keep the interface consistent with that to avoid having to deviate from that code too much and test it separately
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 just want to add one thing. Upon creating account, it should utilise /new_account
on , mpc recovery endpoint
If you struggle to implement, please reach out to me, I have implemented few endpoints successfully from latest mpc recovery so I might be able to help. (I don't think my work is ready for PR and not sure if merging it right now would help this PR or not.)
Lastly, use https://mpc-recovery-leader-dev-7tk2cmmtcq-ue.a.run.app/ as endpoint for communicating with mpc recovery. This is the URL that contains latest work from mpc-service.
858ec87
to
f1017c6
Compare
…m/near/fast-auth-signer into 16-implement-create-account-route
How's this coming along @esaminu |
const checkPassKey = async (): Promise<void> => { | ||
const isPasskeyReady = await isPassKeyAvailable(); | ||
if (!isPasskeyReady) { | ||
openToast({ | ||
title: '', | ||
type: 'INFO', | ||
description: | ||
'Passkey support is required for account creation. Try using an updated version of Chrome or Safari to create an account.', | ||
duration: 5000, | ||
}); | ||
} | ||
}; | ||
checkPassKey(); |
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 believe this is no longer there in the latest version of fast auth - we are just creating accounts with LAKs in this scenario so we would redirect to successUrl
with added LAK in this case
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 don't understand this one. Do I just remove this code?
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.
We will address this as a separate issue, created #35
@amirsaran3 can you use the |
9f7ad6a
to
96b5619
Compare
96b5619
to
9f7ad6a
Compare
…m/near/fast-auth-signer into 16-implement-create-account-route
New designs for create-account and verify-email routes
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 ✅
Implements /create-account and /verify-email routes. Copied logic and UI from NEAR Discovery repo.