add shit
This commit is contained in:
parent
57137a08d3
commit
c5aa21b75e
6 changed files with 23 additions and 9 deletions
|
@ -38,10 +38,13 @@ func RegisterAuthRoutes(cfg *types.StereoConfig, api *gin.RouterGroup) {
|
|||
}
|
||||
|
||||
// TODO: redirect to dashboard
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
/*c.JSON(http.StatusOK, gin.H{
|
||||
"jwt": jwt,
|
||||
"known": res.RowsAffected == 0,
|
||||
})
|
||||
*/
|
||||
c.SetCookie("jwt", jwt, int(t.ExpiresIn), "", cfg.Domain, true, true)
|
||||
c.Redirect(http.StatusTemporaryRedirect, cfg.FrontendUri)
|
||||
})
|
||||
|
||||
api.GET("/auth/me", auth.JwtMiddleware(cfg.JWTSecret), func(c *gin.Context) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue