Skip to content

Commit

Permalink
Change the default delimiter for cookieName from : to .
Browse files Browse the repository at this point in the history
  • Loading branch information
FAL-coffee committed Feb 22, 2024
1 parent e21e13e commit a23f0ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const defaultsByBackend: {
token: {
signInResponseTokenPointer: '/token',
type: 'Bearer',
cookieName: 'auth:token',
cookieName: 'auth.token',
headerName: 'Authorization',
maxAgeInSeconds: 30 * 60,
sameSiteAttribute: 'lax'
Expand All @@ -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' }
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -220,8 +220,8 @@ export type ProviderLocalRefresh = Omit<ProviderLocal, 'type'> & {
/**
* 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;
/**
Expand Down

0 comments on commit a23f0ce

Please sign in to comment.