From d1c6ae1ba197a282c171547b8fbb94070db6e58e Mon Sep 17 00:00:00 2001 From: Stavros Date: Sun, 16 Feb 2025 22:48:04 +0200 Subject: [PATCH] fix: redirect to frontend when no redirect uri is present in oauth callback --- internal/api/api.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/api/api.go b/internal/api/api.go index 02efa7a..e126ba1 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -533,10 +533,7 @@ func (api *API) SetupRoutes() { // If it is empty it means that no redirect_uri was provided to the login screen so we just log in if redirectURIErr != nil { - c.JSON(200, gin.H{ - "status": 200, - "message": "Logged in", - }) + c.Redirect(http.StatusPermanentRedirect, api.Config.AppURL) } log.Debug().Str("redirectURI", redirectURI).Msg("Got redirect URI")