Skip to content

Commit

Permalink
Reverting to original
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Jan 6, 2025
1 parent 1f0ceba commit 2787cfb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions views/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,13 @@ func (v *Views) _loginGet(c echo.Context) error {

// Check if there is a callback request
callbackURL, err := url.Parse(c.QueryParam("callback"))
if err != nil {
fmt.Println(err)
goto after
}
fmt.Println(callbackURL.Host, strings.HasSuffix(callbackURL.Host, v.conf.BaseDomainName), context.User.Authenticated)
if err == nil && strings.HasSuffix(callbackURL.Host, v.conf.BaseDomainName) && callbackURL.String() != "" {
context.Callback = callbackURL.String()
}
// Check if authenticated
if context.User.Authenticated {
return c.Redirect(http.StatusFound, context.Callback)
}
after:

return v.template.RenderTemplate(c.Response(), context, templates.LoginTemplate, templates.NoNavType)
}
Expand Down

0 comments on commit 2787cfb

Please sign in to comment.