加载登录页面 v2

加载登录页面 v2

加载登录页面 v2

本篇 API 加载 URL 地址为 Hive Web 登录,用户实际上可以登录。当用户登录时,重定向 URL 由应用程序开发人员设置, state 返回逻辑验证的授权token。支持的 IdP 帐户是 Hive, Google, Facebook和 Apple 帐户。

要使用Web登录v2,您首先需要在“Web登录”中完成相关设置。 Hive 安慰 App Center 如下所示。看 控制台指南 了解详情。

Request URL

Commercial Server URL

https://weblogin.withhive.com/login?param=

Sandbox URL

https://sandbox-weblogin.withhive.com/login?param=

Request Header

HTTP Method

GET

Content-Type

text/html

Query Parameters

Field Name

Type

Description

Required

param

string

The param string value is created through URL encoding and BASE64 encoding of the JSON data composed of the key values in the table below.

Y

Query Parameters – param

Field Name

Type

Description

appid

string

Application ID used by Hive

gindex

string

Game Index information used by Hive. App Center > Game List > Search your game and click it > Click the AppID tab > Click the game’s AppID > Check the Basic Info tab to get the Game Index.

url

string

This is the URL address to redirect to after the completion of the user login. It should be the same URL as the redirect URL set in the Hive console.

country

string

the country code set by the game or community. If this value is not provided, the web browser default value is used.

language

string

the language code set by the game or community. If this value is not provided, the web browser default value is used.

Request Example

12345678

// the original param composed of JSON object. The string value obtained by performing URL encoding and BASE64 encoding sequentially on this JSON object is used as a query parameter when calling the API.{ "appid":"com.com2us.hivesdk.ios.community.global.normal", "gindex":"539", "url":"https://community.withhive.com/hivesdk/login/redirect", "country":"KR", "language":"ko"}

12

// Call the API attaching the encoded param to the request URL as a query parameter.https://weblogin.withhive.com/login?param=JTdCJTIyYXBwaWQlMjIlM0ElMjJjb20uY29tMnVzLmhpdmVzZGsuaW9zLmNvbW11bml0eS5nbG9iYWwubm9ybWFsJTIyJTJDJTIyZ2luZGV4JTIyJTNBJTIyNTM5JTIyJTJDJTIydXJsJTIyJTNBJTIyaHR0cHMlM0ElMkYlMkZjb21tdW5pdHkud2l0aGhpdmUuY29tJTJGaGl2ZXNkayUyRmxvZ2luJTJGcmVkaXJlY3QlMjIlMkMlMjJjb3VudHJ5JTIyJTNBJTIyS1IlMjIlMkMlMjJsYW5ndWFnZSUyMiUzQSUyMmtvJTIyJTdE

Response Body

返回重定向 URL 在提供 API 请求“res”作为查询参数附加。请参阅下面的描述以获取解释 res.

Field Name

Description

Type

Required

URL

the redirect URL provided in the API request with the “res” attached as a query parameter

string

Y

Response Sample

12

// If https://community.withhive.com/hivesdk/login/redirect was set as the redirect URLhttps://community.withhive.com/hivesdk/login/redirect?res=JTdCJTIyY29kZSUyMiUzQSUyMjEwMCUyMiUyQyUyMnN0YXRlJTIyJTNBJTIyMTY4ODEwODkyNzk0Mi1CUHVxcHFFaUd6S0lIJTIyJTdE

Response Body – res

这个 res 通过转换得到 JSON 由以下键值组成的对象通过以下方式转换为字符串 URL 编码和 BASE64 编码。要使用 JSON 对象,执行 BASE64 解码,然后 URL 解码。这 JSON 对象如下所示。

Field Name

Description

Type

code

Response code (100: success)

string

state

the token to be used in Verification v2

string

Response Sample – res

1234

{ "code": "100", "state": "1627881984263-jkx1B3GOY3EsJ"}

❈ ❈ ❈

相关文章

✧ ✧ ✧
莜面煎饼怎么做
beat365手机版

莜面煎饼怎么做

📅 09-11 👁️ 5632
霍启刚晒娃,1.6亿豪宅内景曝光:豪门中的“清流”是这么带孩子的
二手苹果4s多少钱,哪里还有回收的?
365体育旗下

二手苹果4s多少钱,哪里还有回收的?

📅 08-09 👁️ 6861