vmurin / react-native-azure-auth

React Native library implementing Azure AD OAuth2 API
MIT License
85 stars 64 forks source link

Login screen is blank #213

Open sjordan2010 opened 3 months ago

sjordan2010 commented 3 months ago

I'm trying to test out the auth flow for a React Native(0.73.6) app. I'm using react-native-azure-auth (^1.8.9).

My signin function is firing, it is opening up a window to login.microsoftonline.com, but that is always just a blank white screen. I've attached some screenshots from my emulator.

Code:


export const azureAuth = new AzureAuth({
  clientId: 'my client id',
  tenant: 'my tenant id',
});

export async function signIn() {
  try {
    let tokens = await azureAuth.webAuth.authorize({
      scope: 'openid profile User.Read Mail.Read',
    });
    console.log('tokens: ', tokens);
  } catch (error) {
    console.log(error);
*** This console log is firing when I close out the blank login.microsoftonline.com window.
error:
'aa.session.user_cancelled'
error_description:
'User cancelled the Auth'

  }
}

Simulator Screenshot - iPhone 15 Pro Max - 2024-03-26 at 10 53 40 Simulator Screenshot - iPhone 15 Pro Max - 2024-03-26 at 10 53 45 Simulator Screenshot - iPhone 15 Pro Max - 2024-03-26 at 10 53 50