Skip to content

How do I get a token outside of useAuth with @clerk/expo #1511

@nvsd

Description

@nvsd

I'm trying to add an auth header to my fetch function but I'm finding it difficult.

import {Clerk} from @clerk/expo is undefined
I could use useAuth but this is awkward I want to do something like

import {getToken} from '@clerk/expo'

fetch('whatever', {headers: {Authorization: await getToken()}})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions