Xsolla-logo
  • 文档
  • 创建帐户

通过社交网络进行认证Client-side

get/social/{provider_name}/login_redirect

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

Request
path Parameters
provider_name
required
string

Name of the social network connected to Login in Publisher Account. Can be: amazon, apple, babka, baidu, battlenet, discord, epicgames, facebook, github, google,kakao, linkedin, mailru, microsoft, msn, naver, ok, paypal, qq, reddit, steam, twitch, twitter, vimeo,vk, wechat, weibo, xbox, yahoo, yandex, youtube.

If you store user data in PlayFab, only twitch is available.

query Parameters
projectId
required
string <uuid>

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

login_url
string

URL to redirect the user to after account confirmation, successful authentication, two-factor authentication configuration, or password reset confirmation. Must be identical to the Callback URL specified in the URL block of Publisher Account. For the scenario of a login error, the value should be identical to the the Error callback URL specified in the URL block of Publisher Account. To find the settings, go to Login > your Login project and select the Callback URLs section in the upper block. Required if there are several Callback URLs.

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.

phone_only
boolean
Default: false

Arrange xsolla wallet form behaivior values:

  • true show only passwordless by phone,
  • false all auth methods.
Responses
302

重定向

400

错误的请求

401

错误的请求

404

未找到

422

无法处理的实体

429

请求过多

Request samples
curl --request GET \
  --url 'https://login.xsolla.com/api/social/{provider_name}/login_redirect?projectId=SOME_STRING_VALUE&login_url=SOME_STRING_VALUE&fields=SOME_ARRAY_VALUE&payload=SOME_STRING_VALUE&with_logout=0&locale=SOME_STRING_VALUE&phone_only=false'
Response samples
{
  • "error": {
    }
}