diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-01-18 20:48:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 20:48:51 -0800 |
commit | 95f70a9a6aec3a4c1b23f837a26bc5c0d4266554 (patch) | |
tree | ab196297e879dd38bfe5bb0d73f712739cda36d1 /src/state/session/index.tsx | |
parent | 89f4105082dde925f0c69ca86629cbe6ce3c3d7d (diff) | |
download | voidsky-95f70a9a6aec3a4c1b23f837a26bc5c0d4266554.tar.zst |
Phone number verification in account creation (#2564)
* Add optional sms verification * Add support link to account creation * Add e2e tests * Bump api@0.9.0 * Update lockfile * Bump api@0.9.1 * Include the phone number in the ui * Add phone number validation and normalization
Diffstat (limited to 'src/state/session/index.tsx')
-rw-r--r-- | src/state/session/index.tsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 0a565c975..e49bc2b39 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -44,6 +44,8 @@ export type ApiContext = { password: string handle: string inviteCode?: string + verificationPhone?: string + verificationCode?: string }) => Promise<void> login: (props: { service: string @@ -203,7 +205,15 @@ export function Provider({children}: React.PropsWithChildren<{}>) { }, [setStateAndPersist, queryClient]) const createAccount = React.useCallback<ApiContext['createAccount']>( - async ({service, email, password, handle, inviteCode}: any) => { + async ({ + service, + email, + password, + handle, + inviteCode, + verificationPhone, + verificationCode, + }: any) => { logger.info(`session: creating account`, { service, handle, @@ -217,6 +227,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) { password, email, inviteCode, + verificationPhone, + verificationCode, }) if (!agent.session) { |