Explorar o código

fix: add check for allowed domains

the_aceix hai 1 ano
pai
achega
605090786a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      pro/auth/headless_callback.go

+ 4 - 0
pro/auth/headless_callback.go

@@ -52,6 +52,10 @@ func HandleHeadlessSSOCallback(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	if !isEmailAllowed(userClaims.Email) {
+		handleOauthUserNotAllowedToSignUp(w)
+		return
+	}
 	// check if user approval is already pending
 	if logic.IsPendingUser(userClaims.getUserName()) {
 		handleOauthUserSignUpApprovalPending(w)