DEV Community

Discussion on: JWT Authentication with Gin | Go

Collapse
 
krifoelectron profile image
Arsenii

is it right to do logout like this?

package handlers

import (
"github.com/gin-gonic/gin"
)

func (s *Server) Logout(context *gin.Context) {
context.SetCookie("Mental", "", -1, "", "", false, true)
}

or it is possible to ban the token