使用Azure AD进行身份验证-React Native

bim*_*mix 5 authentication azure azure-active-directory react-native

我正在尝试使用此库向Azure进行身份验证,'react-native-azure-ad2'但似乎无法正常工作。登录后,它将显示以下错误消息:

很抱歉,我们无法登录。请求中指定的回复URL与为应用程序'xxxxxxxxxxxxxxxxxxxxxx'配置的回复URL不匹配

这是我的代码:

    var credentials = {
    client_id: 'xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxx',
    client_secret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    redirectUrl: 'msalxxxxxxx-xxxxxx-xxxxx-xxxxx-xxxxxxxxxx://auth',
    scope: 'User.Read'
};

export default class AzureLogin3 extends React.Component {

    constructor(props) {
        super(props);
        this.azureInstance = new AzureInstance(credentials);
        this._onLoginSuccess = this._onLoginSuccess.bind(this);
    }

    _onLoginSuccess() {
             this.azureInstance.getUserInfo().then(result => {
             console.log(result);
           }).catch(err => {
            console.log(err);
        })
    }

    render() {
        return (
            <AzureLoginView
                azureInstance={this.azureInstance}
                loadingMessage="Requesting access token"
                onSuccess={this._onLoginSuccess}
            />
        );
    }
}
Run Code Online (Sandbox Code Playgroud)

我尝试了所有这些凭据,并以不同的方式进行了组合,但是错误消息仍然相同。