Skip to content

[bug] getToken is not a function in nuxt/vue #5441

@divine

Description

@divine

Preliminary Checks

Reproduction

https://github.com/divine/clerk-nuxt-quickstart

Publishable key

not_related

Description

Steps to reproduce:

  1. Fork reproduction url
  2. Set publishable key and secret key in .env
  3. npm install && npm run dev
  4. Visit the dev site
  5. Sign in
  6. Click on fetch token button
  7. See console error: Error fetching token: TypeError: getToken is not a function
  8. Is this even tested?
    Expected behavior:

Should return: a promise that resolves to the token. * https://clerk.com/docs/hooks/use-auth#returns

async (options) => {
    const loadedClerk = await clerkLoaded(clerk);
    if (!loadedClerk.session) {
      return null;
    }
    return loadedClerk.session.getToken(options);
  }

Actual behavior:

Error fetching token: TypeError: getToken is not a function

Environment

not applicable

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