summaryrefslogtreecommitdiffstats
path: root/routers/user/auth_openid.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2017-08-19 17:34:49 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-08-19 17:34:49 +0200
commit2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a (patch)
tree674c05386c007308c7b4033756eba7cc6536b58c /routers/user/auth_openid.go
parentNo error log entries for repo 404 (#2200) (diff)
downloadforgejo-2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a.tar.xz
forgejo-2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a.zip
Add OpenID configuration in install page (#2276)
Diffstat (limited to 'routers/user/auth_openid.go')
-rw-r--r--routers/user/auth_openid.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go
index dcc3fcf0fc..a5124680dd 100644
--- a/routers/user/auth_openid.go
+++ b/routers/user/auth_openid.go
@@ -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")