Xsolla-logo

更新用户的双因素认证设置

post/users/me/mfa

Updates user’s two-factor authentication settings. The user must confirm the changes by entering a one-time code.

The workflow of using this call:

  1. The user enables or disables two-factor authentication.
  2. The application sends the request to the Xsolla Login server.
  3. The Xsolla Login server sends the one-time confirmation code to the user and returns the URL of the two-factor authentication page.
  4. The application redirects the user to the URL.
  5. The user enters the one-time code.
  6. New two-factor authentication settings are applied.

You must enable two-factor authentication for the Login project. Contact your Customer Success Manager to enable it.

SecurityBearer
Request
query Parameters
login_url
string

在帐户确认、成功认证、双因素认证配置或密码重置确认后将用户重定向到的URL。必须与发布商帐户URL部分中指定的回调URL相同。要找到它,请前往登录管理器 > 您的登录管理器项目,在导航页的顶部区块中选择回调部分。 如果有多个回调URL,此参数为必需

Request Body schema: application/json
mfa_type
required
string

Type of the second factor. Can be: email or sms. You must enable the specified type for the Login project. Contact your Customer Success Manager to set it up.

Enum: "email" "sms"
enabled
boolean
Default: false

双因素认证设置的状态。设置为true值以启用,设置为false值以禁用。

locale
string

<language code>_<country code> 格式的区域,其中:

Responses
200

确定

401

未授权

422

无法处理的实体

429

请求过多

Request samples
application/json
{
  • "enabled": true,
  • "mfa_type": "email"
}