I am testing the login with this index.svelte file
<script lang="ts">
import { session } from "$app/stores";
import { signOut as authSignOut } from "sk-auth/client";
function signIn() {
location.assign('/api/auth/signin/cognito?redirect=/');
}
function signOut() {
authSignOut().then(session.set);
}
console.log($session.user)
</script>
{#if !$session.user}
<button on:click="{signIn}">Log In with Cognito</button>
{:else}
<p>You are logged in as: {$session.user.email}!</p>
<button on:click={signOut}>Log Out</button>
{/if}
The authentication works but as soon as I am passing more then one token to the session.user the login breaks and the session.user remains "undefined":
When I am removing all but one token from the OAuth2 Configuration the object is passed as expected:
Any clues why this happens? I assume this has to do with the size of the passed cookie / HTTP headers, but I do not know how to verify this assumption.
I am trying to add authentication for AWS cognito with sk-auth.
This is my current
src/lib/appAuth.ts
fileI am testing the login with this index.svelte file
The authentication works but as soon as I am passing more then one token to the session.user the login breaks and the session.user remains "undefined":
When I am removing all but one token from the OAuth2 Configuration the object is passed as expected:
(
src/lib/appAuth.ts
)Any clues why this happens? I assume this has to do with the size of the passed cookie / HTTP headers, but I do not know how to verify this assumption.