add logout route
This commit is contained in:
parent
36624b675d
commit
07ebc06b32
2 changed files with 6 additions and 0 deletions
|
|
@ -30,6 +30,11 @@ func (h *authHandler) PasswordPage(w http.ResponseWriter, r *http.Request) {
|
|||
ui.Render(w, r, pages.AuthPassword(""))
|
||||
}
|
||||
|
||||
func (h *authHandler) Logout(w http.ResponseWriter, r *http.Request) {
|
||||
h.authService.ClearJWTCookie(w)
|
||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||
}
|
||||
|
||||
func (h *authHandler) SendMagicLink(w http.ResponseWriter, r *http.Request) {
|
||||
email := strings.TrimSpace(r.FormValue("email"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue