Skip to main content

configuration/createAuthAdapter

Configuration

CreateAuthAdapterParams

CreateAuthAdapterParams: {createSession: () => Promise\<AuthSession>;isAuthenticated: () => Promise\<boolean> | boolean; }

Create a new web2 auth adapter.

Type declaration

createSession()

createSession: () => Promise\<AuthSession>

create a new session

Returns

Promise\<AuthSession>

isAuthenticated()?

optional isAuthenticated: () => Promise\<boolean> | boolean

check if the user is authenticated

Returns

Promise\<boolean> | boolean


createAuthAdapter()

createAuthAdapter(params): Web2AuthAdapter

Create a new web2 auth adapter.

Parameters

params: CreateAuthAdapterParams

the parameters to create the adapter

Returns

Web2AuthAdapter

the auth adapter

Other

CreateAuthAdapterParams

CreateAuthAdapterParams: ZodObject\<{createSession: ZodFunction\<ZodTuple\<[], ZodUnknown>, ZodPromise\<ZodObject\<{externalCustomerId: ZodOptional\<ZodString>;token: ZodString; }, "strip", ZodTypeAny, {externalCustomerId: string;token: string; }, {externalCustomerId: string;token: string; }>>>;isAuthenticated: ZodOptional\<ZodFunction\<ZodTuple\<[], ZodUnknown>, ZodPromise\<ZodBoolean>>>; }, "strip", ZodTypeAny, {createSession: (...args) => Promise\<{externalCustomerId: string;token: string; }>;isAuthenticated: (...args) => Promise\<boolean>; }, {createSession: (...args) => Promise\<{externalCustomerId: string;token: string; }>;isAuthenticated: (...args) => Promise\<boolean>; }>

Type declaration

createSession

createSession: ZodFunction\<ZodTuple\<[], ZodUnknown>, ZodPromise\<ZodObject\<{externalCustomerId: ZodOptional\<ZodString>;token: ZodString; }, "strip", ZodTypeAny, {externalCustomerId: string;token: string; }, {externalCustomerId: string;token: string; }>>>

isAuthenticated

isAuthenticated: ZodOptional\<ZodFunction\<ZodTuple\<[], ZodUnknown>, ZodPromise\<ZodBoolean>>>