@fusionauth/vue-sdk / Exports / FusionAuthConfig
Config for the FusionAuth Vue SDK
- autoRefreshSecondsBeforeExpiry
- clientId
- loginPath
- logoutPath
- mePath
- nuxtUseCookie
- onAutoRefreshFailure
- onRedirect
- postLogoutRedirectUri
- redirectUri
- registerPath
- scope
- serverUrl
- shouldAutoFetchUserInfo
- shouldAutoRefresh
- tokenRefreshPath
• Optional autoRefreshSecondsBeforeExpiry: number
The number of seconds before the access token expiry when the auto refresh functionality kicks in if enabled. Default is 30.
• clientId: string
The client id of the application.
• Optional loginPath: string
The path to the login endpoint.
• Optional logoutPath: string
The path to the logout endpoint.
• Optional mePath: string
The path to the me endpoint.
• Optional nuxtUseCookie: <T>(name: string, _opts?: CookieOptions<T> & { readonly?: false }) => CookieRef<T><T>(name: string, _opts: CookieOptions<T> & { readonly: true }) => Readonly<CookieRef<T>>
Pass in useCookie from nuxt/app useCookie.
This is needed for the Vue SDK to support Nuxt/SSR.
▸ <T>(name, _opts?): CookieRef<T>
| Name | Type |
|---|---|
T |
undefined | null | string |
| Name | Type |
|---|---|
name |
string |
_opts? |
CookieOptions<T> & { readonly?: false } |
CookieRef<T>
▸ <T>(name, _opts): Readonly<CookieRef<T>>
| Name | Type |
|---|---|
T |
undefined | null | string |
| Name | Type |
|---|---|
name |
string |
_opts |
CookieOptions<T> & { readonly: true } |
Readonly<CookieRef<T>>
• Optional onAutoRefreshFailure: (error: Error) => void
Callback to be invoked if a request to refresh the access token fails during autorefresh.
▸ (error): void
| Name | Type |
|---|---|
error |
Error |
void
• Optional onRedirect: (state?: string) => void
Callback function to be invoked with the state value upon redirect from login or register.
▸ (state?): void
| Name | Type |
|---|---|
state? |
string |
void
• Optional postLogoutRedirectUri: string
The redirect URI for post-logout. Defaults the provided redirectUri.
• redirectUri: string
The redirect URI of the application.
• Optional registerPath: string
The path to the register endpoint.
• Optional scope: string
The OAuth2 scope parameter passed to the /oauth2/authorize endpoint. If not specified fusionauth will default this to openid offline_access.
• serverUrl: string
The URL of the FusionAuth server.
• Optional shouldAutoFetchUserInfo: boolean
Enables the SDK to automatically handle fetching user info when logged in. Defaults to false.
• Optional shouldAutoRefresh: boolean
Enables automatic token refreshing. Defaults to false.
• Optional tokenRefreshPath: string
The path to the token refresh endpoint.