-
Notifications
You must be signed in to change notification settings - Fork 133
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
Showcase registration flow #1836
Conversation
import { displayUserNumberWarmup } from "./finish"; | ||
import { savePasskey } from "./passkey"; | ||
|
||
/** Registration (anchor creation) flow for new users */ | ||
export const registerFlow = async <T>({ |
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.
most of this is was just extracted from register
@@ -83,17 +83,17 @@ export type LoginResult = | |||
| NoSeedPhrase | |||
| SeedPhraseFail | |||
| CancelOrTimeout; | |||
export type RegisterResult = | |||
| LoginSuccess | |||
export type RegisterResult<T = AuthenticatedConnection> = |
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.
these types are a mess but I don't have time to clean this up right now
This refactors the `register` function to be able to showcase the registration flow without needing to spin up a canister. A type parameter had to be added to `RegisterResult` to allow "mocking" the result without creating an actual canister connection. The flow part is extracted from `register`, which is now a wrapper around this new `registerFlow`; `register` now only deals with canister/concrete implementation details whereas `registerFlow` only focuses on the user interaction.
a714d80
to
35aaae7
Compare
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.
Rubber stamp
This extracts the flow essence of the authenticateBox so that the flow can be showcased on `/flows/loginManage`. In practice, most canister calls were abstracted away so that the flow can be used without an actual canister. Similar to the registration flow showcased in #1836.
This extracts the flow essence of the authenticateBox so that the flow can be showcased on `/flows/loginManage`. In practice, most canister calls were abstracted away so that the flow can be used without an actual canister. Similar to the registration flow showcased in #1836.
This refactors the
register
function to be able to showcase the registration flow without needing to spin up a canister.A type parameter had to be added to
RegisterResult
to allow "mocking" the result without creating an actual canister connection.The flow part is extracted from
register
, which is now a wrapper around this newregisterFlow
;register
now only deals with canister/concrete implementation details whereasregisterFlow
only focuses on the user interaction.🟡 Some screens were changed