Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

How do I access the session token from a load function? #74

@half2me

Description

@half2me

I am able to get the session token jwt like this:

<ClerkLoaded let:clerk>
	{#await clerk?.session?.getToken() then token}
		{token}
	{/await}
</ClerkLoaded>

But I need to be able to use this from a load function as I'm fetching a third party resource which needs an Authorization header. Is there a way I can get it like https://clerk.com/docs/references/javascript/session#get-token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions