1
0
Fork 0
forked from forgejo/forgejo

Revert "[GITEA] rework long-term authentication"

This reverts commit 8d2dab94a6.
This commit is contained in:
Earl Warren 2024-01-16 14:11:28 +00:00
parent fd098cf75b
commit d694579bdf
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
17 changed files with 156 additions and 367 deletions

View file

@ -1122,7 +1122,8 @@ func handleOAuth2SignIn(ctx *context.Context, source *auth.Source, u *user_model
// we can't sign the user in just yet. Instead, redirect them to the 2FA authentication page.
if !needs2FA {
if err := updateSession(ctx, nil, map[string]any{
"uid": u.ID,
"uid": u.ID,
"uname": u.Name,
}); err != nil {
ctx.ServerError("updateSession", err)
return