Set up social login with WeChat (Web)
The official Logto connector for WeChat social sign-in in web apps.
In this guide, we assume you have basic knowledge of Logto Connectors. If you don't, check out the Configure connectors guide to get started.
Get startedβ
If you don't know the concept of the connector or don't know how to add this connector to your Sign-in experience, please see Logto tutorial.
β οΈ Caution
This connector is for web apps only. If you are looking for the method for signing in with WeChat in native apps, please see WeChat native connector.
Create a web app in the WeChat Open Platformβ
π‘ Tip
You can skip some sections if you have already finished.
Create an accountβ
Open https://open.weixin.qq.com/, click the "Sign Up" button in the upper-right corner, then finish the sign-up process.
Create a web appβ
Sign in with the account you just created. In the "Web Application" (η½ι‘΅εΊη¨) tab, click the big green button "Create a web app" (εε»Ίη½ι‘΅εΊη¨).
Let's fill out the required info in the application form.
Basic infoβ
Most of them are pretty straightforward. After finishing the form, click "Next step" to move on.
Website infoβ
Fill "Authorization callback domain" (ζζεθ°ε) with your Logto domain. E.g., logto.io
.
Waiting for the review resultβ
After completing the website info, click "Submit Review" to continue. Usually, the review goes fast, which will end within 1-2 days.
We suspect the reviewer is allocated randomly on each submission since the standard is floating. You may get rejected the first time, but don't give up! State your status quo and ask the reviewer how to modify it.
Configure your WeChat connectorβ
Fill out the clientId
and clientSecret
field with Client ID and Client Secret you've got from OAuth app detail pages.
Fill out the scope
field with either 'snsapi_userinfo' or 'snsapi_base'. You can leave this field blank as it is OPTIONAL. The default value is set to be 'snsapi_userinfo'. You can check out the difference between different values.
Test WeChat web connectorβ
That's it. Don't forget to Enable social connector in sign-in experience.
Once WeChat web connector is enabled, you can sign in to your app again to see if it works.