aws-cognito
aws-cognito copied to clipboard
user is always null when using API guard
Describe the bug using API guard, user property is always null.
To Reproduce Steps to reproduce the behavior:
- Download demo and setup site
- use postman and POST to api/user/login get access token
- use postman and GET to api/user/profile
- 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