Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
benjipott committed Dec 4, 2023
1 parent edb2f70 commit 98406bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime/composables/local/useAuthState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useAuthState = (): UseAuthStateReturn => {
const commonAuthState = makeCommonAuthState<SessionData>()

// Re-construct state from cookie, also setup a cross-component sync via a useState hack, see https://github.com/nuxt/nuxt/issues/13020#issuecomment-1397282717
const _rawTokenCookie = useCookie<string | null>(config.token.name, { default: () => null, maxAge: config.token.maxAgeInSeconds, sameSite: config.token.sameSiteAttribute, secure: config.token.secure, domain: config.token.domain })
const _rawTokenCookie = useCookie<string | null>(config.token.name, { default: config.token.default, maxAge: config.token.maxAgeInSeconds, sameSite: config.token.sameSiteAttribute, secure: config.token.secure, domain: config.token.domain })

const rawToken = useState('auth:raw-token', () => _rawTokenCookie.value)
watch(rawToken, () => { _rawTokenCookie.value = rawToken.value })
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ type ProviderLocal = {
* @default auth:token Access the cookie `auth:token` from session
*/
name?: string,

default?: () => string | null
/**
* How to extract the authentication-token from the sign-in response.
*
Expand Down Expand Up @@ -179,7 +181,7 @@ type ProviderLocal = {
* @default undefined use
* @example 'domain.com'
*/
domain?: boolean,
domain?: string,

},
/**
Expand Down

0 comments on commit 98406bb

Please sign in to comment.