【发布时间】:2017-10-08 10:20:23
【问题描述】:
现在,我正在使用 React-Redux 创建 Twitch 应用程序。
我只是在使用 Auth0 时遇到了身份验证问题。
import auth0 from 'auth0-js';
export default class Auth {
constructor() {
this.popupTwitch = this.popupTwitch.bind(this)
}
auth0 = new auth0.WebAuth({
domain: 'XXX.auth0.com',
clientID: XXX,
redirectUri: 'http://localhost:3000/callback',
audience: 'https://XXX.auth0.com/userinfo',
responseType: 'token id_token',
scope: 'openid'
});
popupTwitch() {
this.auth0.popup.authorize({
connection: 'twitch'
})
}
}
当我运行此代码时,auth0 返回以下错误。
http://localhost:3000/?error=redirect_mismatch&error_description=Parameter+redirect_uri+does+not+match+registered+URI&state=XXX
我的设置截图如下。
Twitch Developer Dashboard Apps
Auth0 Custom Social Connection
提前感谢您的帮助。
【问题讨论】: