diff --git a/account/jwt.go b/account/jwt.go index 6e73083..10ab58a 100644 --- a/account/jwt.go +++ b/account/jwt.go @@ -99,7 +99,7 @@ func JWTVerifyToken(token string, domain string, privateKey ed25519.PrivateKey, return claim, err } -func SetAuthCookie(jc jape.Context, apiName string) { +func SetAuthCookie(jc jape.Context, jwt string, apiName string) { for name, api := range apiRegistry.GetAllAPIs() { routeableApi, ok := api.(router.RoutableAPI) if !ok { diff --git a/api/account/account.go b/api/account/account.go index d5783fc..aaf9ab5 100644 --- a/api/account/account.go +++ b/api/account/account.go @@ -118,7 +118,7 @@ func (a AccountAPI) login(jc jape.Context) { return } - account.SetAuthCookie(jc, "") + account.SetAuthCookie(jc, jwt, "") account.SendJWT(jc, jwt) jc.Encode(&LoginResponse{ @@ -213,7 +213,7 @@ func (a AccountAPI) otpValidate(jc jape.Context) { return } - account.SetAuthCookie(jc, "") + account.SetAuthCookie(jc, jwt, "") account.SendJWT(jc, jwt) jc.Encode(&LoginResponse{