Skip to content

cookie token expires immediately after login #411

Open
@mihaa1

Description

@mihaa1

Version: 1.1.70

Describe the bug
Hello,
I am using Authorizer instance deployed on railway.
React + express.
On production, for some reason, right after login, the token is no longer valid, and all subsequent requests fail.

My setup:

  • passing the token in the cookie to the backend
  • using getSession() to authenticate and get the user

Note: I didn't get getSession() to work as described in the docs - with bearer token. I'm passing the cookie to it as below:

const session = await authorizerRef.getSession({
  cookie: `cookie_session=${token}`,
});

Response I'm getting:

[ { message: 'unauthorized', path: [ 'session' ] } ]

Desktop (please complete the following information):

  • OS: Mac
  • Browser: chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions