Skip to content

Baidu

Scenario Introduction

  • Overview: Baidu social login is a user's secure login to a third-party application or website using Baidu as the identity source. Configure and enable Baidu's social login in GenAuth to quickly obtain Baidu's basic open information and help users achieve password-free login through GenAuth.
  • Application scenario: PC side
  • Terminal user preview image:

Notes

  • If you have not registered a Baidu developer account, please go to Baidu Developer Center to register a developer account first.
  • Baidu Developer Center - User Center
  • If you have not opened a GenAuth console account, please go to GenAuth console to register a developer account.

Step 1: Create a website application on Baidu Open Platform

  • After the creation is complete, you need to record the API Key (Client ID) and Secret Key (Client Secret) of the application, which will be used later.

On the security settings page, set the authorization callback page address to: https://core.genauth.ai/connection/social/<Unique Identifier>/<USERPOOL_ID>/callback, you need to replace <Unique Identifier> with your Unique Identifier, and <USERPOOL_ID> with your User Pool ID

Step 2: Configure Baidu in the GenAuth console

2.1 Please click the "Create Social Identity Source" button on the "Social Identity Source" page of the GenAuth console to enter the "Select Social Identity Source" page.

2.2 Please go to the GenAuth console's "Social Identity Source" - "Select Social Identity Source" page, click the "Baidu" identity source button to enter the "Baidu Login Mode" page.

2.3 Please go to the GenAuth console's "Social Identity Source" - "Baidu" page to configure the relevant field information.

Field/FunctionDescription
Unique IDa. The unique ID consists of lowercase letters, numbers, and -, and its length is less than 32 bits. b. This is the unique ID of this connection and cannot be modified after setting.
Display NameThis name will be displayed on the button of the terminal user's login interface.
API KeyBaidu application ID, which needs to be obtained on the Baidu Developer Center.
Secret KeyBaidu application secret key, which needs to be obtained on the Baidu Developer Center.
Callback AddressBaidu Developer Center valid jump URI. This URL needs to be configured on the Baidu Developer Center.
Login ModeAfter turning on "Login Only Mode", you can only log in to existing accounts, and cannot create new accounts. Please choose carefully.

After the configuration is completed, click the "Create" or "Save" button to complete the creation.

After creating the Baidu identity source on the GenAuth console, you need to configure the callback address to the authorization callback page on Baidu.

Step 3: Development Access

  • Recommended Development Access Method: Use Hosted Login Page

  • Pros and Cons: Simple operation and maintenance, which is responsible for GenAuth. Each user pool has an independent secondary domain name; if you need to embed it in your application, you need to log in using the pop-up mode, that is, after clicking the login button, a window will pop up with the login page hosted by GenAuth, or redirect the browser to the login page hosted by GenAuth.

  • Detailed access method:

    3.1 Create an application in the GenAuth console. For details, see: How to create an application in GenAuth

    3.2 On the created Baidu identity source connection details page, open and associate an application created in the GenAuth console

3.3 Experience Baidu third-party login on the login page

Agent infrastructure for identity, memory, and web action.