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
/api/passwordless/login not returning 'context' #6
Comments
Thank you for the issue, investigating |
Faced the same issue, ended up using JSON.stringify on the context object before post request. |
I've investigated the issue and can't reproduce it, what were the steps:
The result: {
"jwt": "my jwt token",
"user": {
"id": 1,
"username": "John Bull",
"email": "user@email.com",
"provider": null,
"confirmed": true,
"blocked": false,
"createdAt": "2022-06-29T13:18:51.909Z",
"updatedAt": "2022-06-29T13:20:36.033Z"
},
"context": {
"test": "test context"
}
} |
So, looks like I can't reproduce the issue, and going to close it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
"context" remains empty even though it exists in the database.
The culprit is this line:
strapi-plugin-passwordless/server/controllers/auth.js
Line 64 in 750f4f5
It throws a SyntaxError:
which is due to parsing a non-JSON entity
Proposed solution:
Update line to
context = JSON.parse(JSON.stringify(token.context))
The text was updated successfully, but these errors were encountered: