diff --git a/internal/api/oauth/callback.go b/internal/api/oauth/callback.go index d9e2513..d8377db 100644 --- a/internal/api/oauth/callback.go +++ b/internal/api/oauth/callback.go @@ -3,11 +3,11 @@ package oauth import ( "context" "fmt" - userApi "git.0x7f.app/WOJ/woj-server/internal/api/user" "git.0x7f.app/WOJ/woj-server/internal/e" "git.0x7f.app/WOJ/woj-server/internal/model" "git.0x7f.app/WOJ/woj-server/internal/service/user" "github.com/gin-gonic/gin" + "net/http" ) // CallbackHandler @@ -109,6 +109,8 @@ func (h *handler) CallbackHandler() gin.HandlerFunc { return } - e.Pong(c, status, userApi.LoginResponse{Token: jwt, NickName: u.NickName}) + // TODO: Figure out a better way to cooperate with frontend + c.Redirect(http.StatusFound, "/login?redirect_token="+jwt) + // e.Pong(c, status, userApi.LoginResponse{Token: jwt, NickName: u.NickName}) } }