AppAuth and Azure AD

I am trying to use AppAuth ( with Azure AD Oauth2 login.

I can authenticate and all like that, but it looks like I don’t get any response back from AppAuth. It just closes down the web browser view. How can I debug this? I am using the Expo iOS Client with a tunnel to the development server.

Example code:

const redirectUrl = Expo.Linking.makeUrl();

const config = {
  issuer: '<client_id>/v2.0',
  scopes: ['openid', 'offline_access'],
  clientId: '<client_id>',
  redirectUrl: redirectUrl,

const StorageKey = 'authState';

export default class LoginScreen extends React.Component {
  constructor(props) {

  render() {
    return (
        <Button title="Sign in with Microsoft" onPress={this._signInAsync} />

  _cacheAuthAsync = async (authState) => {
    return AsyncStorage.setItem(StorageKey, JSON.stringify(authState));

  _signInAsync = async () => {
    const authState = await AppAuth.authAsync(config);
    console.log(authState); // Never gets here...

Perhaps try url encoding your redirectUrl? I use the older AuthSession and that’s what I do.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.