backport: Redirect to correct page after using scratch token (#4472)
This commit is contained in:
parent
678834883e
commit
b37ca4a6ff
|
@ -1,4 +1,5 @@
|
||||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||||
|
// Copyright 2018 The Gitea Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a MIT-style
|
// Use of this source code is governed by a MIT-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
@ -319,7 +320,7 @@ func TwoFactorScratchPost(ctx *context.Context, form auth.TwoFactorScratchAuthFo
|
||||||
|
|
||||||
handleSignInFull(ctx, u, remember, false)
|
handleSignInFull(ctx, u, remember, false)
|
||||||
ctx.Flash.Info(ctx.Tr("auth.twofa_scratch_used"))
|
ctx.Flash.Info(ctx.Tr("auth.twofa_scratch_used"))
|
||||||
ctx.Redirect(setting.AppSubURL + "/user/settings/two_factor")
|
ctx.Redirect(setting.AppSubURL + "/user/settings/security")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue