Make registration carry flow all the way through
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
2021-05-03 20:06:51 -05:00
parent 5bc98e6568
commit 9729de47f8
4 changed files with 31 additions and 0 deletions

View File

@@ -11,11 +11,21 @@ class Forms extends FormController {
}
async registration_provider_get(req, res, next) {
if ( req.session.auth.flow ) {
req.session.registrant_flow = req.session.auth.flow
}
return res.page('auth:register', {
...this.Vue.data({})
})
}
async finish_registration(req, res, next) {
if ( req.trap.has_trap() && req.trap.get_trap() === 'registrant_flow' ) await req.trap.end()
const dest = req.session.registrant_flow || '/dash/profile'
return res.redirect(dest)
}
async login_provider_get(req, res, next) {
const Setting = this.models.get('Setting')