-
Notifications
You must be signed in to change notification settings - Fork 78
JWT token could not be returned #69
Copy link
Copy link
Closed
Labels
Description
There seems to be a bug with the newest versions:
WPGraphQL: 0.6.1
JWT: 0.3.5
When doing the registerUser mutation like so:
mutation RegisterUser($input: RegisterUserInput!) {
registerUser(input: $input) {
user {
jwtAuthExpiration
jwtUserSecret
jwtRefreshToken
isJwtAuthSecretRevoked
jwtAuthToken
}
}
}
The user gets registered, but the response is the following:
{
"errors": [
{
"message": "The user secret could not be returned",
"category": "user",
"locations": [
{
"line": 5,
"column": 7
}
],
"path": [
"registerUser",
"user",
"jwtUserSecret"
]
},
{
"message": "The JWT token could not be returned",
"category": "user",
"locations": [
{
"line": 6,
"column": 7
}
],
"path": [
"registerUser",
"user",
"jwtRefreshToken"
]
},
{
"message": "The JWT token could not be returned",
"category": "user",
"locations": [
{
"line": 8,
"column": 7
}
],
"path": [
"registerUser",
"user",
"jwtAuthToken"
]
}
],
"data": {
"registerUser": {
"user": {
"jwtAuthExpiration": "1580566063",
"jwtUserSecret": null,
"jwtRefreshToken": null,
"isJwtAuthSecretRevoked": false,
"jwtAuthToken": null
}
}
}
}
So it seems for some reason inside ManageTokens.php the following calls don't work as intended:
- Auth::get_user_jwt_secret
- Auth:: get_token
- Auth:: get_refresh_token
Also the error message of refresh token should be different to the one from the token.
Reactions are currently unavailable