react-native-azure-auth icon indicating copy to clipboard operation
react-native-azure-auth copied to clipboard

Login screen is blank

Open sjordan2010 opened this issue 1 year ago • 0 comments

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

sjordan2010 avatar Mar 27 '24 15:03 sjordan2010