0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/connector-wechat
2022-07-01 18:47:14 +08:00
..
docs docs(connector-wechat-web): readme (en-US) (#1346) 2022-07-01 15:38:38 +08:00
src refactor(connector-*): load config template and readme contents while initialization (#1252) 2022-06-27 10:00:37 +08:00
jest.config.ts refactor: use @silverhand/jest-config (#861) 2022-05-17 17:32:41 +08:00
logo.svg feat(core): serve connector logo (#931) 2022-05-24 13:54:37 +08:00
package.json ci: publish workflow (#1342) 2022-07-01 18:47:14 +08:00
README.md docs(connector-wechat-web): readme (en-US) (#1346) 2022-07-01 15:38:38 +08:00
tsconfig.base.json feat(core): wrap wechat connector (#676) 2022-04-28 15:55:49 +08:00
tsconfig.build.json feat(core): wrap wechat connector (#676) 2022-04-28 15:55:49 +08:00
tsconfig.json feat(core): wrap wechat connector (#676) 2022-04-28 15:55:49 +08:00
tsconfig.test.json test: allow JS in tests (#903) 2022-05-20 13:02:36 +08:00

WeChat web connector

The official Logto connector for WeChat social sign-in in web apps.

微信 web 应用社交登录官方 Logto 连接器 中文文档

Table of contents

Get started

If you don't know the concept of the connector or haven't added this connector to your Sign-in experience yet, 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" (创建网站应用).

App tabs

Let's fill out the required info in the application form.

Create a mobile app

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.

Compose the connector JSON

Once passed the review, go to the application details page and generate an AppSecret. Compose the connector JSON with the following format:

{
  "appId": "wx123456789",
  "appSecret": "some-random-string"
}

Test WeChat web connector

That's it. Don't forget to Enable connector in sign-in experience.

Once WeChat web connector is enabled, you can sign in to your app again to see if it works.