Production releases are available on Maven Central.
implementation 'com.ikasoa:spring-social-wechat:${version}'
<dependency>
<groupId>com.ikasoa</groupId>
<artifactId>spring-social-wechat</artifactId>
<version>${version}</version>
</dependency>
You can set multiple providers in your system.
[AppId], [AppSecret] and other parameters can be obtained from the provider website.
spring:
social:
wechat:
app-id: [AppId]
app-secret: [AppSecret]
spring:
social:
wechatmp:
app-id: [AppId]
app-secret: [AppSecret]
spring:
social:
wecom:
app-id: [AppId]
agent-id: [AgentId]
app-secret: [Secret]
Provider Name | Provider Id | Authorization Type | Parameters | Required (if you use this platform) |
Default |
---|---|---|---|---|---|
WeChat Open Platform | QR Code | spring.social.wechat.app-id | yes | ||
spring.social.wechat.app-secret | yes | ||||
spring.social.wechat.check-state | no | true | |||
WeChat Official Accounts Platform | wechatmp | Webpage | spring.social.wechatmp.app-id | yes | |
spring.social.wechatmp.app-secret | yes | ||||
spring.social.wechatmp.check-state | no | true | |||
WeChat Work | wecom | QR Code | spring.social.wecom.app-id | yes | |
spring.social.wecom.agent-id | yes | ||||
spring.social.wecom.app-secret | yes | ||||
spring.social.wechat.check-state | no | true |
This [ProviderId] must be 'wechat', 'wechatmp' or 'wecom'. It depends on the provider you choose. (please refer to the table above)
<form action="/signin/[ProviderId]" method="POST">
<button type="submit">Log in</button>
</form>