Skip to main content

getAuthProviders

Get all auth providers objects.

Description

This method gets all the objects of the authorization providers. It returns a Promise that resolves to an array of IAuthProvidersEntity objects.

AuthProvider.getAuthProviders(

langCode, offset, limit

);

Parameters schema

Schema

langCode: string
Language code. Default: "en_US"
example: "en_US"

offset: number
Parameter for pagination. Default: 0
example: 0

limit: number
Parameter for pagination. Default: 30
example: 30

By default, you can retrieve 10 objects. This is due to the record limit in the module's permissions settings.
For pagination to work correctly, you need to configure Module permissions according to your needs in the corresponding section.

Examples

Minimal example

const response = await AuthProvider.getAuthProviders();

Example with attributes

const response = await AuthProvider.getAuthProviders('en_US', 0, 30);

Example response

[
{
"id": 1,
"localizeInfos": {
"title": "email"
},
"config": {
"accessTokenTtlSec": "36000",
"refreshTokenTtlMc": "604800",
"tokenSecretKey": "my-secret",
"deleteNoneActiveUsersAfterDays": "2",
"systemCodeTlsSec": "120",
"systemCodeLength": "6"
},
"version": 0,
"identifier": "email",
"type": "email",
"formIdentifier": "reg",
"userGroupIdentifier": "guest",
"isActive": true,
"isCheckCode": false
}
]

Response schema

Schema: IAuthProvidersEntity[]

id: number
The unique identifier of the auth provider entity.
example: 194

localizeInfos: ILocalizeInfo
Localized information for the auth provider.
example:

{
"key": "value"
}

config: IAuthProvidersEntityConfig
Configuration settings for the auth provider, stored as a key-value pair object.
example:

{
"key": "value"
}

config.accessTokenTtlSec: string
Access token time to live in seconds.
example: "3600"

config.refreshTokenTtlMc: string
Refresh token time to live in milliseconds.
example: "86400000"

config.tokenSecretKey: string
Token secret key.
example: "secret_key"

config.deleteNoneActiveUsersAfterDays: string
Delete none active users after days.
example: "30"

config.systemCodeTlsSec: string
System code time to live in seconds.
example: "86400"

config.systemCodeLength: string
System code length.
example: "6"

version: number
The version number of the auth provider entity.
example: 1

identifier: string
A unique string that identifies the auth provider.
example: "email"

type: string
The type of the auth provider (e.g., 'email', 'google', etc.).
example: "email"

formIdentifier: string | null
The identifier for the form associated with the auth provider, or null if not applicable.
example: "reg_form"

userGroupIdentifier: string
The identifier for the userGroup associated with the auth provider.
example: "guest"

isActive: boolean
Indicates whether the auth provider is active.
example: true

isCheckCode: boolean
Indicates whether the auth provider requires code verification.
example: false