现在,我正在使用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
提前感谢您的帮助。
发布于 2017-10-08 10:20:23
您好,您需要将twitch回调设置为重定向到auth0,而不是本地主机。所需的域名可在auth0客户端的设置中找到:https://manage.auth0.com/#/clients
希望这能有所帮助:)
https://stackoverflow.com/questions/46511202
复制相似问题