mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 20:23:50 +08:00
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:
@ -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");
|
||||
|
Reference in New Issue
Block a user