Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

"Unauthorized request" after login with SSO token #1981

Open
animeshsarkar-bct opened this issue Sep 4, 2020 · 1 comment
Open

"Unauthorized request" after login with SSO token #1981

animeshsarkar-bct opened this issue Sep 4, 2020 · 1 comment
Labels

Comments

@animeshsarkar-bct
Copy link

Hi,
I was trying to integrate the SSO login in a Vue app and it is working and I can able to get request_token. But this token is not working when I try to call another API.
steps

  1. Call SSO Provider using https://mydomain.com/projectname/auth/sso/google?mode=jwt&redirect_url=https://myvueappdomain.com/callback
  2. Getting https://myvueappdomain.com/callback?request_token=xxxxxxx. I got that token
  3. Store that token in local storage
  4. Try to call API with that local storage stored token
  "url": "https://mydomain.com/projectname/users/me ",
  "method": "GET",
  "headers": {
    "content-type": "application/json",
    "authorization": "Bearer xxxxxxx",

but it gave me "Unauthorized request" code 3

Please help me if I am doing anything wrong

@animeshsarkar-bct
Copy link
Author

I found the solution in your code I called /auth/sso/access_token with resuest_token and it works.
But, it was not written on your documentation

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

No branches or pull requests

2 participants