2017-10-01 9 views
0

이제 React-Redux로 트 위치 애플 리케이션을 만들고 있습니다.Auth0 맞춤식 사회 연결 확장 프로그램이 트 위치에서 작동하지 않습니까?

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

감사합니다.

답변

0

안녕하세요 당신은 로컬 호스트가 아닌 auth0으로 리디렉션되도록 트 위치 콜백을 설정해야합니다. 필요 도메인은 auth0 클라이언트의 설정에서 찾을 수 있습니다 도움이 :) https://manage.auth0.com/#/clients

희망을

+0

안녕, 당신의 도움 제드 주셔서 감사합니다. – Hei

+0

트위터 리디렉션 URI를 변경하려고합니다. 승인 페이지를 트위치에 올릴 수 있습니다. 'https : //passport.twitch.tv/authorizations/new? client_id = xxx & login = xxx & redirect_uri = https : // xxx.auth0.com/login/callback & response_type = 코드 & 스코프 = 오픈 아이디 + channel_editor + 채널 읽기 & 상태 = xxx' 동의를 클릭하면, 401 오류가 발생했습니다. – Hei

+0

twitch URL에서 auth0 범위를 사용하고있는 것처럼 보입니다. 성공적인 로그인을 위해 범위를'user_read'로 변경해야합니다. – Jed