From a23f0ce33c50e8db37d104f10cd96d381ff61e01 Mon Sep 17 00:00:00 2001 From: FAL-coffee Date: Fri, 23 Feb 2024 02:26:55 +0900 Subject: [PATCH] Change the default delimiter for cookieName from : to . --- src/module.ts | 6 +++--- src/runtime/types.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/module.ts b/src/module.ts index c9e598c2..f10a35ee 100644 --- a/src/module.ts +++ b/src/module.ts @@ -52,7 +52,7 @@ const defaultsByBackend: { token: { signInResponseTokenPointer: '/token', type: 'Bearer', - cookieName: 'auth:token', + cookieName: 'auth.token', headerName: 'Authorization', maxAgeInSeconds: 30 * 60, sameSiteAttribute: 'lax' @@ -76,14 +76,14 @@ const defaultsByBackend: { token: { signInResponseTokenPointer: '/token', type: 'Bearer', - cookieName: 'auth:token', + cookieName: 'auth.token', headerName: 'Authorization', maxAgeInSeconds: 5 * 60, sameSiteAttribute: 'none' // 5 minutes }, refreshToken: { signInResponseRefreshTokenPointer: '/refreshToken', - cookieName: 'auth:refresh-token', + cookieName: 'auth.refresh-token', maxAgeInSeconds: 60 * 60 * 24 * 7 // 7 days }, sessionDataType: { id: 'string | number' } diff --git a/src/runtime/types.ts b/src/runtime/types.ts index cbfec570..094c446e 100644 --- a/src/runtime/types.ts +++ b/src/runtime/types.ts @@ -141,8 +141,8 @@ export type ProviderLocal = { /** * It refers to the name of the property when it is stored in a cookie. * - * @default auth:token - * @example auth.token + * @default auth.token + * @example auth._token */ cookieName?: string; /** @@ -220,8 +220,8 @@ export type ProviderLocalRefresh = Omit & { /** * It refers to the name of the property when it is stored in a cookie. * - * @default auth:refresh-token - * @example auth.refresh-token + * @default auth.refresh-token + * @example auth._refresh-token */ cookieName?: string; /**