getAuthProviders
Get all auth providers.
Description
Fetches all auth providers and resolves to an array of IAuthProvidersEntity objects.
.getAuthProviders(
,
,
);
Parameters schema
Schema
langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"
offset: number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.
example: 0
limit: number
Maximum number of records to return. Default: 30.
example: 30
Record limit. If the user group's permission for this method allows only restricted reading, the API returns at most the number of records set in the project settings (10 by default), whatever limit you pass. With full read access, limit works as usual. See Module permissions (opens in a new tab).
Examples
Minimal example
const response = await AuthProvider.getAuthProviders();
Example with all parameters
const response = await AuthProvider.getAuthProviders('en_US', 0, 30);
Example response
[
{
"id": 1,
"localizeInfos": {
"title": "email"
},
"config": {
"accessTokenTtlSec": "36000",
"refreshTokenTtlMc": "604800",
"deleteNoneActiveUsersAfterDays": "2",
"systemCodeTlsSec": "120",
"systemCodeLength": "6",
"systemCodeOnlyNumbers": null,
"oauthAuthUrl": null
},
"version": 0,
"identifier": "email",
"type": "email",
"formIdentifier": "reg",
"userGroupIdentifier": "guest",
"isActive": true,
"isCheckCode": false
}
]
Response schema
Schema: IAuthProvidersEntity[]
id: number
ID of the auth provider.
example: 194
localizeInfos: ILocalizeInfo
Localized data of the auth provider.
example:
{
"title": "Example title"
}
config: IAuthProvidersEntityConfig
Provider configuration as key-value pairs.
example:
{
"accessTokenTtlSec": "36000",
"refreshTokenTtlMc": "604800",
"deleteNoneActiveUsersAfterDays": "2",
"systemCodeTlsSec": "120",
"systemCodeLength": "6",
"systemCodeOnlyNumbers": null,
"oauthAuthUrl": null
}
config.accessTokenTtlSec: string
Lifetime of the access token, in seconds.
example: "3600"
config.refreshTokenTtlMc: string
Lifetime of the refresh token, in seconds (despite the Mc suffix).
example: "604800"
config.deleteNoneActiveUsersAfterDays: string
Number of days after which inactive users are deleted.
example: "30"
config.systemCodeTlsSec: string
Lifetime of the one-time code, in seconds.
example: "86400"
config.systemCodeLength: string
Length of the one-time code.
example: "6"
config.oauthAuthUrl: string | null
OAuth authorization URL.
example: null
config.systemCodeOnlyNumbers: string | null
Whether the one-time code uses digits only; null when not set.
example: null
version: number
Version number of the auth provider; changes with each update.
example: 1
identifier: string
Marker of the auth provider.
example: "email"
type: string
Type of the auth provider, for example "email".
example: "email"
formIdentifier: string | null
Marker of the form linked to the auth provider, or null if there is none.
example: "reg_form"
userGroupIdentifier: string
Identifier of the user group linked to the auth provider.
example: "guest"
isActive: boolean
Whether the auth provider is active.
example: true
isCheckCode: boolean
Whether new users must be activated with a one-time code. Also enables signing in with a code instead of a password.
example: false