mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
Move oauth2 error to oauth2 service package (#17603)
This commit is contained in:
parent
43bbc54783
commit
0e189eecaa
3 changed files with 20 additions and 28 deletions
|
@ -10,7 +10,6 @@ import (
|
|||
"net/http"
|
||||
"regexp"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/login"
|
||||
"code.gitea.io/gitea/modules/auth/pam"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
|
@ -386,7 +385,7 @@ func EditAuthSourcePost(ctx *context.Context) {
|
|||
source.IsSyncEnabled = form.IsSyncEnabled
|
||||
source.Cfg = config
|
||||
if err := login.UpdateSource(source); err != nil {
|
||||
if models.IsErrOpenIDConnectInitialize(err) {
|
||||
if oauth2.IsErrOpenIDConnectInitialize(err) {
|
||||
ctx.Flash.Error(err.Error(), true)
|
||||
ctx.HTML(http.StatusOK, tplAuthEdit)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue