This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / web / src / routes / oauth / callback / +page.svelte
891 B 33 lines
1<script lang="ts"> 2 import { resolve } from "$app/paths"; 3 import { goto } from "$app/navigation"; 4 import { getAuth } from "$lib/auth.svelte"; 5 import { onMount } from "svelte"; 6 7 const auth = getAuth(); 8 const appPath = (path: string) => resolve(path as "/"); 9 10 onMount(() => { 11 void (async () => { 12 try { 13 const target = await auth.completeSignIn(); 14 await goto(appPath(target), { replaceState: true }); 15 } catch (e) { 16 console.error(e); 17 } 18 })(); 19 }); 20</script> 21 22<svelte:head> 23 <title>Signing in &middot; Tangled</title> 24</svelte:head> 25 26{#if auth.error} 27 <section class="mx-auto flex max-w-md flex-col items-center gap-4 px-7 py-16 text-center"> 28 <p class="text-base text-foreground-danger">{auth.error}</p> 29 <a href={appPath("/login")} class="inline-flex underline">Try again</a> 30 </section> 31{:else} 32 <p class="sr-only" role="status">Signing you in&hellip;</p> 33{/if}