diff --git a/server/api/auth/login.post.ts b/server/api/auth/login.post.ts index e1d41a8..2207581 100644 --- a/server/api/auth/login.post.ts +++ b/server/api/auth/login.post.ts @@ -28,11 +28,14 @@ export default eventHandler(async (event) => { message: 'Account inactive!
Resend verification?', }); } - let tok = user.generateJWT(useRuntimeConfig().jwt); + let tok = user.generateRefreshToken(useRuntimeConfig().jwt); // setCookie(event, "rockfic_cookie", tok); return { user, - token: tok, + token: { + refresh: tok, + access: user.generateAccessToken(useRuntimeConfig().jwt), + }, }; } else { throw createError({ statusCode: 401, message: wrongMsg });