mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-09 16:45:43 +00:00
style: fix fmt and lint
This commit is contained in:
parent
8bd1c7ff31
commit
32de0745e4
1 changed files with 7 additions and 4 deletions
|
@ -17,6 +17,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
asymkey_model "code.gitea.io/gitea/models/asymkey"
|
||||
"code.gitea.io/gitea/models/auth"
|
||||
org_model "code.gitea.io/gitea/models/organization"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
|
@ -48,8 +49,6 @@ import (
|
|||
"github.com/markbates/goth/providers/openidConnect"
|
||||
"github.com/markbates/goth/providers/zoom"
|
||||
go_oauth2 "golang.org/x/oauth2"
|
||||
|
||||
asymkey_model "code.gitea.io/gitea/models/asymkey"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1209,7 +1208,7 @@ func getSSHKeys(source *oauth2.Source, gothUser *goth.User) ([]string, error) {
|
|||
return sshKeys, nil
|
||||
}
|
||||
|
||||
func updateSshPubIfNeed(
|
||||
func updateSSHPubIfNeed(
|
||||
ctx *context.Context,
|
||||
authSource *auth.Source,
|
||||
fetchedUser *goth.User,
|
||||
|
@ -1240,7 +1239,11 @@ func updateSshPubIfNeed(
|
|||
|
||||
func handleOAuth2SignIn(ctx *context.Context, source *auth.Source, u *user_model.User, gothUser goth.User) {
|
||||
updateAvatarIfNeed(ctx, gothUser.AvatarURL, u)
|
||||
updateSshPubIfNeed(ctx, source, &gothUser, u)
|
||||
err := updateSSHPubIfNeed(ctx, source, &gothUser, u)
|
||||
if err != nil {
|
||||
ctx.ServerError("updateSSHPubIfNeed", err)
|
||||
return
|
||||
}
|
||||
|
||||
needs2FA := false
|
||||
if !source.Cfg.(*oauth2.Source).SkipLocalTwoFA {
|
||||
|
|
Loading…
Reference in a new issue