Update 'app/controllers/auth/Oauth2.controller.js'
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5f0d67d525
commit
670b9b1299
@ -36,12 +36,6 @@ class Oauth2 extends Oauth2Controller {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( req.query.state ) {
|
|
||||||
const state = Array.isArray(req.query.state) ? req.query.state[0] : req.query.state
|
|
||||||
const uri_params = new URLSearchParams(uri.params)
|
|
||||||
uri_params.set('state', state)
|
|
||||||
}
|
|
||||||
|
|
||||||
req.user.authorize(starship_client)
|
req.user.authorize(starship_client)
|
||||||
await req.user.save()
|
await req.user.save()
|
||||||
return super.authorize_post(req, res, next)
|
return super.authorize_post(req, res, next)
|
||||||
@ -73,6 +67,12 @@ class Oauth2 extends Oauth2Controller {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( req.query.state ) {
|
||||||
|
const state = Array.isArray(req.query.state) ? req.query.state[0] : req.query.state
|
||||||
|
const uri_params = new URLSearchParams(uri.params)
|
||||||
|
uri_params.set('state', state)
|
||||||
|
}
|
||||||
|
|
||||||
if ( req.user.has_authorized(starship_client) ) {
|
if ( req.user.has_authorized(starship_client) ) {
|
||||||
return this.Vue.invoke_action(res, {
|
return this.Vue.invoke_action(res, {
|
||||||
text: 'Grant Access',
|
text: 'Grant Access',
|
||||||
|
Loading…
Reference in New Issue
Block a user