简体   繁体   中英

How to get the "fragment" part of an url in a nuxt middleware?

I want to get the access_token in the url after a redirection from AWS COGNITO in a "implicit" oauth flow. AWS Cognito redirect the browser to : https://mydomain/#access_token=xxxxx

I want to get the "access_token=xxxxx" part for storage, in a nuxt "middleware".

It doesn't seam to be in the "context.req" object. Where can I find it ?

The Implicit flow doesn't return an authorization code like the Authorization flow does. You'll get the access token directly in the response body.

Here is a link with more info.

Implicit Flow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM