PetrusCustomConfig - AckeeCZ/petrus Wiki

Interface: PetrusCustomConfig<Config>

Type parameters

Name Type
Config extends PetrusConfig = PetrusConfig

Table of contents

Properties

Properties

handlers

handlers: Config["handlers"]

Defined in

types/index.ts:307


initialState

Optional initialState: Partial<PetrusEntitiesState>

Initial state of the entities reducer.

Defined in

types/index.ts:305


logger

Optional logger: Config["logger"]

default Console

Defined in

types/index.ts:287


mapStorageDriverToTokensPersistence

Optional mapStorageDriverToTokensPersistence: Partial<Record<TokensPersistence, StorageDriver>>

Set a custom storage driver for a given TokensPersistence.

Defined in

types/index.ts:312


oAuth

Optional oAuth: Object

Type declaration

Name Type
enforceAccessTokenScheme? Config["oAuth"]["enforceAccessTokenScheme"]
enforceRefreshTokenScheme? Config["oAuth"]["enforceRefreshTokenScheme"]
fetchAccessToken? Config["oAuth"]["fetchAccessToken"]
origin Config["oAuth"]["origin"]
parseRedirectUrlParams? Config["oAuth"]["parseRedirectUrlParams"]
processTokens? Config["oAuth"]["processTokens"]
redirectPathname Config["oAuth"]["redirectPathname"]
validateRedirectUrl? Config["oAuth"]["validateRedirectUrl"]

Defined in

types/index.ts:289


selector

selector: Config["selector"]

This function must return petrus reducer from your application root state, so you can set it on nested level or on different path.

default (state) => state.auth

Defined in

types/index.ts:282


tokens

Optional tokens: Partial<Config["tokens"]>

Defined in

types/index.ts:300

⚠️ **GitHub.com Fallback** ⚠️