Skip to main content

Configuration

note

Draft document..


import { initAuth } from '@badisi/auth-js';

await initAuth(settings: AuthSettings);

Global

authorityUrl*

type: string
required

clientId*

type: string
required

loginRequired

type: boolean
default: true

retrieveUserSession

type: boolean
default: true

loadUserInfo

type: boolean
default: false

automaticSilentRenew

type: boolean
default: true

desktopNavigationType

type: enum - DesktopNavigation.(REDIRECT, POPUP)
default: REDIRECT

scope

type: string
default: "openid profile email phone"

logLevel

type: enum - Log.(NONE, ERROR, WARN, INFO, DEBUG)
default: NONE

internal

type: UserManagerSettings

Angular

automaticInjectToken

type: boolean or custom object
default: any hostname or pathname that starts with 'api'

Custom object example
automaticInjectToken: {
include: (url: string): boolean => url?.includes('user'),
exclude: [
'/public-api',
/^\/my-custom-api\/.*$/gm
]
}

automaticLoginOn401

type: boolean
default: true

authGuardRedirectUrl

type: string

Mobile

mobileScheme

type: string