Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user is always null when using API guard #106

Open
minkbear opened this issue Jul 17, 2024 · 0 comments
Open

user is always null when using API guard #106

minkbear opened this issue Jul 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@minkbear
Copy link

minkbear commented Jul 17, 2024

Describe the bug
using API guard, user property is always null.

To Reproduce
Steps to reproduce the behavior:

  1. Download demo and setup site
  2. use postman and POST to api/user/login get access token
  3. use postman and GET to api/user/profile
  4. unable to get user models

I take a look closer on https://github.com/ellaisys/aws-cognito/blob/master/src/Guards/CognitoTokenGuard.php#L373
so I set primaryKey = "sub" in user models. The problem is gone.
and no docs here.

Expected behavior
able to get user models when using API guard

@amitdhongde amitdhongde self-assigned this Aug 5, 2024
@amitdhongde amitdhongde added the bug Something isn't working label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants