Login token
#1655
Replies: 1 comment
-
Hi, Check these docs: https://www.vendure.io/docs/storefront/managing-sessions/#bearer-token-sessions Specifically:
So you don't want to use that "token" value from the response body - that is related to the Channel. Instead, inspect the response headers for the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Iam sending the request for login using
mutation{ login(username:"[email protected]",password:"12345678",rememberMe:true){ __typename ...on CurrentUser{ identifier channels{ id token code permissions __typename } } } }
and i am getting response
{ "data": { "login": { "__typename": "CurrentUser", "identifier": "[email protected]", "channels": [ { "id": "1", "token": "lbm6ltowtmpodo0uj8o", "code": "__default_channel__", "permissions": [ "Authenticated" ], "__typename": "CurrentUserChannel" } ] } } }
After login when i call 'me' api using the token < "token": "lbm6ltowtmpodo0uj8o",> it is not working
{ me { id } }
header i tried
Authorization:Bearer lbm6ltowtmpodo0uj8o
Authorization:bearer lbm6ltowtmpodo0uj8o
i am getting the message
{ "errors": [ { "message": "You are not currently authorized to perform this action", "locations": [ { "line": 2, "column": 3 } ], "path": [ "me" ], "extensions": { "code": "FORBIDDEN" } } ], "data": { "me": null } }
i am using bearer token
tokenMethod: 'bearer'
is this the right token i am sending or not.
How exactly do i get the correct token.
Beta Was this translation helpful? Give feedback.
All reactions