Explorar o código

fix google restricted domain

Alexander Belanger %!s(int64=5) %!d(string=hai) anos
pai
achega
bb2fe812cd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/api/oauth_google_handler.go

+ 1 - 1
server/api/oauth_google_handler.go

@@ -145,7 +145,7 @@ func (app *App) upsertGoogleUserFromToken(tok *oauth2.Token) (*models.User, erro
 
 	// if the app has a restricted domain, check the `hd` query param
 	if app.ServerConf.GoogleRestrictedDomain != "" {
-		if gInfo.HD != "bloomchat.app" {
+		if gInfo.HD != app.ServerConf.GoogleRestrictedDomain {
 			return nil, fmt.Errorf("Email is not in the restricted domain group.")
 		}
 	}