Interface: AuthProviderProps

July 8, 2025 ยท View on GitHub

oidc-react


oidc-react / AuthProviderProps

Interface: AuthProviderProps

Defined in: auth-context-interface.ts:33

Properties

authority?

optional authority: string

Defined in: auth-context-interface.ts:41

The URL of the OIDC/OAuth2 provider.


automaticSilentRenew?

optional automaticSilentRenew: boolean

Defined in: auth-context-interface.ts:109

Flag to indicate if there should be an automatic attempt to renew the access token prior to its expiration.

Defaults to true.


autoSignIn?

optional autoSignIn: boolean

Defined in: auth-context-interface.ts:89

Flag to control automatic redirection to the OIDC/OAuth2 provider when not signed in.

Defaults to true.


autoSignInArgs?

optional autoSignInArgs: SigninRedirectArgs

Defined in: auth-context-interface.ts:93

Optional sign in arguments to be used when autoSignIn is enabled.


autoSignOut?

optional autoSignOut: boolean

Defined in: auth-context-interface.ts:99

Flag to control automatic sign out redirection to the OIDC/OAuth2 provider when silent renewal fails.

Defaults to true.


autoSignOutArgs?

optional autoSignOutArgs: SignoutRedirectArgs

Defined in: auth-context-interface.ts:103

Optional sign out arguments to be used when autoSignOut is enabled.


clientId?

optional clientId: string

Defined in: auth-context-interface.ts:53

Your client application's identifier as registered with the OIDC/OAuth2 provider.


clientSecret?

optional clientSecret: string

Defined in: auth-context-interface.ts:57

Client secret defined on the identity server.


extraQueryParams?

optional extraQueryParams: Record<string, string>

Defined in: auth-context-interface.ts:49

Extra query params passed to the authorization url.


loadUserInfo?

optional loadUserInfo: boolean

Defined in: auth-context-interface.ts:115

Flag to control if additional identity data is loaded from the user info endpoint in order to populate the user's profile.

Defaults to true.


location?

optional location: Location

Defined in: auth-context-interface.ts:83

Defaults to windows.location.


metadata?

optional metadata: Partial<OidcMetadata>

Defined in: auth-context-interface.ts:45

Manually set metadata if CORS is not configured on the OIDC/OAuth2 provider.


onBeforeSignIn()?

optional onBeforeSignIn: () => unknown

Defined in: auth-context-interface.ts:136

On before sign in hook. Can be use to store the current url for use after signing in.

This only gets called if autoSignIn is true

Returns

unknown


onSignIn()?

optional onSignIn: (userData) => void | Promise<void>

Defined in: auth-context-interface.ts:141

On sign in hook. Can be a async function.

Parameters

userData

User

null | User

Returns

void | Promise<void>


onSignInError()?

optional onSignInError: (error) => void

Defined in: auth-context-interface.ts:150

On sign in error. Can be a async function.

Parameters

error

Error

Returns

void


onSignOut()?

optional onSignOut: (options?) => void | Promise<void>

Defined in: auth-context-interface.ts:145

On sign out hook. Can be a async function.

Parameters

options?

AuthProviderSignOutProps

Returns

void | Promise<void>


popupRedirectUri?

optional popupRedirectUri: string

Defined in: auth-context-interface.ts:126

The URL for the page containing the call to signinPopupCallback to handle the callback from the OIDC/OAuth2


popupWindowFeatures?

optional popupWindowFeatures: PopupWindowFeatures

Defined in: auth-context-interface.ts:121

The features parameter to window.open for the popup signin window

defaults to 'location=no,toolbar=no,width=500,height=500,left=100,top=100'


popupWindowTarget?

optional popupWindowTarget: string

Defined in: auth-context-interface.ts:131

The target parameter to window.open for the popup signin window. * defaults to '_blank'


postLogoutRedirectUri?

optional postLogoutRedirectUri: string

Defined in: auth-context-interface.ts:69

The post-logout redirect URI of your client application which your OIDC/OAuth2 provider can redirect to after completing logout.


redirectUri?

optional redirectUri: string

Defined in: auth-context-interface.ts:61

The redirect URI of your client application to receive a response from the OIDC/OAuth2 provider.


responseType?

optional responseType: string

Defined in: auth-context-interface.ts:75

Tells the authorization server which grant to execute.

Read more: https://tools.ietf.org/html/rfc6749#section-3.1.1


scope?

optional scope: string

Defined in: auth-context-interface.ts:79

A space-delimited list of permissions that the application requires.


silentRedirectUri?

optional silentRedirectUri: string

Defined in: auth-context-interface.ts:65

The redirect URI of your client application to receive a response from the OIDC/OAuth2 provider when completing a background sign-in refresh.


userManager?

optional userManager: UserManager

Defined in: auth-context-interface.ts:37

See UserManager for more details.