fix: Dedicated token name for next version
This commit is contained in:
@@ -65,7 +65,7 @@ export const jwt = {
|
|||||||
* @param request The express request object
|
* @param request The express request object
|
||||||
*/
|
*/
|
||||||
export function parseJwt(request: Request): string {
|
export function parseJwt(request: Request): string {
|
||||||
const token: string | undefined = request.cookies.token;
|
const token: string | undefined = request.cookies.next_token;
|
||||||
|
|
||||||
if (!token) {
|
if (!token) {
|
||||||
throw new NotAuthenticated();
|
throw new NotAuthenticated();
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function getCookieDomain(): string | undefined {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class UserService {
|
export class UserService {
|
||||||
public static readonly COOKIE_NAME = 'token';
|
public static readonly COOKIE_NAME = 'next_token';
|
||||||
|
|
||||||
public static async id(id: string) {
|
public static async id(id: string) {
|
||||||
return wrapRedis(Keys.User.id(id), async () => {
|
return wrapRedis(Keys.User.id(id), async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user