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

Get JWT Token, get No #30

Open
gadget114514 opened this issue Apr 12, 2020 · 4 comments
Open

Get JWT Token, get No #30

gadget114514 opened this issue Apr 12, 2020 · 4 comments

Comments

@gadget114514
Copy link

Get JWT Token (http://localhost:3000/graphql), server returns

{
"data": null,
"errors": [
{
"message": "Unauthorized",
"locations": [
{
"line": 14,
"column": 3
}
],
"path": [
"decodeToken"
],
"extensions": {
"type": "NO_ACCESS"
}
}
]
}

Something may be needed when sending Get JWT Token request.

@clifinger
Copy link
Collaborator

Hi @gadget114514 ,
Did you login at first to have the session cookie?
You should also configure your client to send back the cookie :)

@gadget114514
Copy link
Author

i see; you intend that when sending this request, cookie is correct after logggin in. i'll check it.

@olexiyb olexiyb closed this as completed Apr 13, 2020
@olexiyb olexiyb reopened this Apr 13, 2020
@olexiyb
Copy link
Collaborator

olexiyb commented Apr 13, 2020

At this moment we use Authorization outside of GraphQL approach in this boilerplate
I personally was not able to run in the web browser authorized queries and I ended up adding jest tests and used it to actually run and test. But playground itself is helpful to analyze graphql schema and as an editor.

If you will find a way to pass properly cookies, please update this issue.

BTW take a look into How add cookies in request

@clifinger
Copy link
Collaborator

Hi guys,
#32 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants