Skip to content

How do I get the access token? #337

@justinmchase

Description

@justinmchase

I see in the callback method the access token is available but I need it in the protected method.

{
  path: "/protected",
  async handler(req) {
    const sessionId = await getSessionId(req);
    if (!sessionId)
      return new Response("Unauthenticated", { status: 401 })

    // How can I get the access token?
    // - need to do authz
    // - need to use the token to call the api
  },
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions