Update 'app/controllers/auth/Oauth2.controller.js'
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2021-09-15 04:12:59 +00:00
parent 1852be4ef0
commit 5f0d67d525

View File

@ -36,6 +36,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)
}
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)