From e2844df53ba383a41bba4af1c51a52eb44a71b02 Mon Sep 17 00:00:00 2001 From: F04C Date: Wed, 14 Jan 2026 08:25:19 +0800 Subject: [PATCH] removed the snippet where it checks the authorization in authentication, authn is purely checking if the user is registered in db --- handlers/google_auth.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/handlers/google_auth.go b/handlers/google_auth.go index f5acf36..662c22b 100644 --- a/handlers/google_auth.go +++ b/handlers/google_auth.go @@ -309,20 +309,6 @@ func GoogleCallback(w http.ResponseWriter, r *http.Request) { return } - // Check user authorization via authorization microservice - allowed, err := checkUserAuthorization(userID, accessToken) - if err != nil { - helper.LogError(err, "Authorization check failed") - helper.RespondWithError(w, http.StatusBadGateway, "Authorization check failed") - return - } - - if !allowed { - helper.LogWarn(fmt.Sprintf("User %s denied access by authorization service", userID)) - helper.RespondWithError(w, http.StatusForbidden, "Access denied: Insufficient permissions") - return - } - helper.LogInfo("Copy this access token: " + accessToken) if FetchedRedirectURI != nil && *FetchedRedirectURI != "" {