I am trying to authenticate to Azure using this library 'react-native-azure-ad2'
but it seems like it is not working properly. After I login it displays this error message:
"Sorry, but we're having trouble signing you in. The reply url specified in the request does not match the reply URLs configured for the application 'xxxxxxxxxxxxxxxxxxxxxx'
Here is my code:
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}
/>
);
}
}
I have tried all of those credentials and combined in different ways but the error message remains the same.