Sina Weibo signs users in with their Weibo account, a mainstream consumer identity in mainland China.
Copy the redirect URI
In the Authdog console, select the project and environment, open Authentication > Providers, find 新浪微博 (Weibo), and click Enable. Copy the redirect URI shown in the form:
https://identity.authdog.com/api/v1/callback/<connectionId>Create the application
- Open the Weibo open platform and create a web application.
- Set the authorization callback page to the redirect URI from Authdog.
- Complete the application review Weibo requires before public use.
- Copy the App Key and App Secret.
Configure Authdog
| Field | Value |
|---|---|
| Client ID | The Weibo App Key |
| Client Secret | The Weibo App Secret |
Save, then toggle the connection active.
What Weibo returns
Authdog requests the provider's default scopes and reads the profile from https://api.weibo.com/2/account/get_uid.json.
The account endpoint returns the numeric Weibo uid, which Authdog uses as the stable identifier.
This connector does not return an email address, so users who arrive through it have a display name and an identifier only. Pair it with a method that collects one, or ask for an email after the first sign-in.
Test it
- Open your environment's hosted sign-in page, or link to
https://identity.authdog.com/api/v1/signin/<connectionId>. - Select the Weibo button and complete the flow.
- Confirm the user appears under Users in the console with a Weibo identity linked.
Troubleshooting
| Symptom | Cause |
|---|---|
redirect_uri_mismatch |
The callback page does not match the registered value |
| Only test accounts can sign in | The application has not passed Weibo's review |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own connectionId, and so its own redirect URI to register |
Related
| Read | To learn how to |
|---|---|
| Connectors | Set up any other social provider |