feat: add steam support (#497)

* feat: add steam support

Signed-off-by: 0x2a <stevesough@gmail.com>

* fix: wrong name

Signed-off-by: Steve0x2a <stevesough@gmail.com>
This commit is contained in:
Steve0x2a
2022-02-16 19:57:46 +08:00
committed by GitHub
parent 4122c94205
commit 661abd6b6e
9 changed files with 76 additions and 9 deletions

View File

@ -69,6 +69,7 @@ class AuthCallback extends React.Component {
UNSAFE_componentWillMount() {
const params = new URLSearchParams(this.props.location.search);
let isSteam = params.get("openid.mode")
let code = params.get("code");
// WeCom returns "auth_code=xxx" instead of "code=xxx"
if (code === null) {
@ -78,6 +79,10 @@ class AuthCallback extends React.Component {
if (code === null) {
code = params.get("authCode")
}
//Steam don't use code, so we should use all params as code.
if (isSteam !== null && code === null) {
code = this.props.location.search
}
const innerParams = this.getInnerParams();
const applicationName = innerParams.get("application");