forked from forgejo/forgejo
Add OpenID configuration in install page (#2276)
This commit is contained in:
parent
e7653a67a1
commit
2c3a229a3c
7 changed files with 67 additions and 26 deletions
|
@ -259,6 +259,7 @@ func ConnectOpenID(ctx *context.Context) {
|
|||
|
||||
// ConnectOpenIDPost handles submission of a form to connect an OpenID URI to an existing account
|
||||
func ConnectOpenIDPost(ctx *context.Context, form auth.ConnectOpenIDForm) {
|
||||
|
||||
oid, _ := ctx.Session.Get("openid_verified_uri").(string)
|
||||
if oid == "" {
|
||||
ctx.Redirect(setting.AppSubURL + "/user/login/openid")
|
||||
|
@ -300,10 +301,6 @@ func ConnectOpenIDPost(ctx *context.Context, form auth.ConnectOpenIDForm) {
|
|||
|
||||
// RegisterOpenID shows a form to create a new user authenticated via an OpenID URI
|
||||
func RegisterOpenID(ctx *context.Context) {
|
||||
if !setting.Service.EnableOpenIDSignUp {
|
||||
ctx.Error(403)
|
||||
return
|
||||
}
|
||||
oid, _ := ctx.Session.Get("openid_verified_uri").(string)
|
||||
if oid == "" {
|
||||
ctx.Redirect(setting.AppSubURL + "/user/login/openid")
|
||||
|
@ -328,10 +325,6 @@ func RegisterOpenID(ctx *context.Context) {
|
|||
|
||||
// RegisterOpenIDPost handles submission of a form to create a new user authenticated via an OpenID URI
|
||||
func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.SignUpOpenIDForm) {
|
||||
if !setting.Service.EnableOpenIDSignUp {
|
||||
ctx.Error(403)
|
||||
return
|
||||
}
|
||||
oid, _ := ctx.Session.Get("openid_verified_uri").(string)
|
||||
if oid == "" {
|
||||
ctx.Redirect(setting.AppSubURL + "/user/login/openid")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue