浏览代码

fix: add check for allowed domains

the_aceix 1 年之前
父节点
当前提交
605090786a
共有 1 个文件被更改,包括 4 次插入0 次删除
  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
 		return
 	}
 	}
 
 
+	if !isEmailAllowed(userClaims.Email) {
+		handleOauthUserNotAllowedToSignUp(w)
+		return
+	}
 	// check if user approval is already pending
 	// check if user approval is already pending
 	if logic.IsPendingUser(userClaims.getUserName()) {
 	if logic.IsPendingUser(userClaims.getUserName()) {
 		handleOauthUserSignUpApprovalPending(w)
 		handleOauthUserSignUpApprovalPending(w)