{#snippet advancedSection()} {#if advancedPermissions} {@render advancedPermissions()} {/if} {/snippet}
{#if auth.status === 'idle' || auth.status === 'loading'}

{title}

Checking for a signed-in account... {:else if auth.session}
{#if needsMorePermissions}

This page needs permissions your current sign-in did not grant. Sign in again so your PDS can ask you for them.

{@render advancedSection()} {:else}

Continue with this account to use the tool, or sign out to use a different one.

{@render advancedSection()} {/if}
{:else}

{title}

{#if auth.status === 'error' && auth.error} Could not restore your previous sign-in: {auth.error}

Signing in below creates a fresh session and fixes this.

{/if}

You will be sent to your PDS to approve the permissions this page needs. Your password is only ever typed into your own PDS.

{#if errorMessage} {errorMessage} {/if}
{@render advancedSection()} {/if}