Xsolla-logo
  • 文档
  • 创建帐户

通过社交网络进行认证

get/social/{provider_name}/login_redirect

将用户重定向到通过指定社交网络进行认证的页面。

Request
path Parameters
query Parameters
projectId
required
string <uuid>

发布商帐户中的登录管理器项目ID。

login_url
string

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

fields
Array of strings non-empty

必须额外从用户或社交网络请求并写入JWT的参数列表。参数必须用逗号分隔。例如,email

如果请求了email而社交网络没有响应email值:

  • 将提示用户在相应的表单中输入邮箱地址(如果集成了登录管理器小组件);
  • 必须要求用户在您自己的界面中输入邮箱地址(如果集成了Login API)。请将该表单的URL发送给您的客户成功经理。

输入邮箱地址后,用户会收到一封邮箱确认消息。要禁用邮箱确认,请联系您的客户成功经理。

payload
string

Your custom data. The value of the parameter will be returned in the payload claim of the user JWT. Recommended maximum length less than 500 characters. Note, that this parameter is only available if you use a custom user data storage.

with_logout
string
Default: "0"

显示是否停用现有用户JWT值并激活此调用生成的值。可以是以下值:

  • 1,停用现有值并激活新值;
  • 0,保持现有值的激活状态。
locale
string >= 2 characters

Region in the <language code>_<country code> format, where:

The list of social networks will be sorted from most to least used, according to the variable value.

Responses
302

重定向

400

错误的请求

401

错误的请求

404

未找到

422

无法处理的实体

429

请求过多

Request samples
Response samples
{
  • "error": {
    }
}