File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- import { encodeQuery } from '../utilities'
1+ import { encodeQuery , parseQuery } from '../utilities'
22import nanoid from 'nanoid'
33const isHttps = process . server ? require ( 'is-https' ) : null
44
@@ -133,7 +133,8 @@ export default class Oauth2Scheme {
133133 return
134134 }
135135
136- const parsedQuery = Object . assign ( { } , this . $auth . ctx . route . query , this . $auth . ctx . route . hash )
136+ const hash = parseQuery ( this . $auth . ctx . route . hash . substr ( 1 ) )
137+ const parsedQuery = Object . assign ( { } , this . $auth . ctx . route . query , hash )
137138 // accessToken/idToken
138139 let token = parsedQuery [ this . options . token_key || 'access_token' ]
139140 // refresh token
@@ -148,7 +149,7 @@ export default class Oauth2Scheme {
148149
149150 // -- Authorization Code Grant --
150151 if ( this . options . response_type === 'code' && parsedQuery . code ) {
151- let data = await this . $auth . request ( {
152+ const data = await this . $auth . request ( {
152153 method : 'post' ,
153154 url : this . options . access_token_endpoint ,
154155 baseURL : process . server ? undefined : false ,
You can’t perform that action at this time.
0 commit comments