Access URL token AFTER SSO redirect express

Viewed 85

I'm building an app that uses corporate SSO login. The SSO is configured to redirect users to my back end's /auth endpoint with an access token in the URL. I want to grab the token from the URL, set it as an httpCookie, then redirect my user back to the React front end application. However, it seems that I am unable to access the extended data in the url (token_type, access_token):

Here's what the Url looks like :

http://localhost:3000/auth#token_type=bearer&access_token=eyJhbGciOiJSUzI1NiIsImprd....

Endpoint code :

app.get("/auth",(req,res) => {

  console.log(req)

  res.sendStatus(200)

})
0 Answers
Related