Saltar al contenido principal

Baidu OAuth

  1. Read Baidu Open Auth and create an application.

Create Baidu APP

  1. Set the redirect URL in the app settings. Add your Casdoor domain in the domain setting, not in the callback URL field — Baidu’s callback URL validation often fails if you put the full URL there, and only one domain or URL is allowed (unlike the docs).

Configuración de URL de Baidu Redirect URL Setting

precaución
  • Use the domain setting for your Casdoor domain; adding the full callback URL in the callback URL field often fails validation and breaks login.
  • Only one URL or domain can be added.
  1. Copy Client ID and Client Secret from the app.

Cliente de Baidu

  1. In Casdoor add an OAuth provider, set Type to Baidu, and enter Client ID and Client secret.

Proveedor de Baidu

Troubleshooting
  • If Baidu reports an incorrect redirect URL: add your domain in the correct place, then reset the Secret (Baidu may show an error but the secret updates after refresh). If it still fails, delete the app and create a new one, and set the domain first.
  • Baidu returns a masked username; Casdoor uses that masked value as the username.