Add traps; user registration

This commit is contained in:
garrettmills
2020-05-20 09:56:03 -05:00
parent 7663cea2ea
commit ea77402750
19 changed files with 493 additions and 24 deletions

View File

@@ -86,6 +86,7 @@ class PasswordController extends Controller {
// Create the password reset
const reset = await req.user.reset_password(req.body.password)
await req.user.save()
if ( req.trap.has_trap() && req.trap.get_trap() === 'password_reset' ) await req.trap.end()
// invalidate existing tokens and other logins
const flitter = await this.auth.get_provider('flitter')