From 7517e20bcce760c896e6b349c98cf04f88d6e00f Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 11 May 2025 22:11:09 -0600 Subject: fix: redirect to dashboard when already logged in at callback url --- app/controllers/sessions/controller.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers/sessions/controller.go') diff --git a/app/controllers/sessions/controller.go b/app/controllers/sessions/controller.go index 2853358..898244c 100644 --- a/app/controllers/sessions/controller.go +++ b/app/controllers/sessions/controller.go @@ -93,6 +93,11 @@ When it is decoded it has the following form: ``` */ func (c *Controller) Create(w http.ResponseWriter, r *http.Request) { + if middleware.IsLoggedIn(r) { + http.Redirect(w, r, "/dashboard", http.StatusFound) + return + } + tokens, err := c.svc.Exchange(r) if err != nil { pls.LogError(r.Context(), err) -- cgit v1.2.3