mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 03:33:49 +08:00
feat: support login by following wechat official account (#1284)
* show QRcode when click WeChat Icon * update how to show qrcode * handle wechat scan qrcode * fix api problems * fix url problems * fix problems * modify get frequency * remove useless print * fix:fix PR problems * fix: fix PR problems * fix:fix PR problem * fix IMG load delay problems * fix:fix provider problems * fix test problems * use gofumpt to fmt code * fix:delete useless variables * feat:add button for follow official account * fix:fix review problems * use gofumpt to fmt code * fix:fix scantype problems * fix Response problem * use gofumpt to format code
This commit is contained in:
@ -14,6 +14,9 @@
|
||||
|
||||
import React from "react";
|
||||
import {Alert, Button, Result, message} from "antd";
|
||||
import {getWechatMessageEvent} from "./AuthBackend";
|
||||
import * as Setting from "../Setting";
|
||||
import * as Provider from "./Provider";
|
||||
|
||||
export function showMessage(type, text) {
|
||||
if (type === "success") {
|
||||
@ -150,3 +153,12 @@ export function getQueryParamsFromState(state) {
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
export function getEvent(application, provider) {
|
||||
getWechatMessageEvent()
|
||||
.then(res => {
|
||||
if (res.data === "SCAN" || res.data === "subscribe") {
|
||||
Setting.goToLink(Provider.getAuthUrl(application, provider, "signup"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user