diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-06-15 20:26:41 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-06-15 20:26:41 -0500 |
commit | 07b92a2180ca6600f09e03a85c8ca7a06d24cbfc (patch) | |
tree | 1f7fd65f7cbaf59ff93c92595dc04a22b0a079a7 /src/state/index.ts | |
parent | 81441c3c265ae6e733365dcba01f7da650f5b1f9 (diff) | |
download | voidsky-07b92a2180ca6600f09e03a85c8ca7a06d24cbfc.tar.zst |
Implement full auth flow in iOS
Diffstat (limited to 'src/state/index.ts')
-rw-r--r-- | src/state/index.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/state/index.ts b/src/state/index.ts index fa7c9518d..460815d13 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -7,6 +7,7 @@ import { import {Environment} from './env' import * as storage from './storage' import * as auth from './auth' +import * as urls from '../platform/urls' const ROOT_STATE_STORAGE_KEY = 'root' @@ -32,9 +33,9 @@ export async function setupState() { if (env.authStore) { const isAuthed = await auth.isAuthed(env.authStore) rootStore.session.setAuthed(isAuthed) - const ucan = await auth.parseUrlForUcan() - if (ucan) { - await env.authStore.addUcan(ucan) + + // handle redirect from auth + if (await auth.initialLoadUcanCheck(env.authStore)) { rootStore.session.setAuthed(true) } } |