Skip to content

Sanctum branch: Query.me returns null after login #38

Closed

Description

@lkmadushan

Query.me returns null after login. Does anyone know the reason?

Activity

  1. spawnia commented on Jan 23, 2025

    @spawnia
    Collaborator

    I just updated #9. Can you describe what steps you performed? I can not quite remember myself what was necessary to make it work.

  2. lkmadushan commented on Jan 23, 2025

    @lkmadushan
    Author

    @spawnia I have setup the sanctum branch, ran the db:seed and I was able to successfully login through the graphiql client.

    Image

    But when accessing the Query.me, it always returns null. auth()->user() is always null.

    Image
  3. lkmadushan commented on Jan 23, 2025

    @lkmadushan
    Author

    I can see request headers contains session and xsrf cookies as well.

    Image
  4. spawnia commented on Jan 23, 2025

    @spawnia
    Collaborator

    I just tried it, works fine for me with localhost. I think it is not working for you due to your URL not being listed in the config/sanctum.php setting stateful.

  5. lkmadushan commented on Jan 23, 2025

    @lkmadushan
    Author

    @spawnia that solved the problem. thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions