title: How to login using microsoft account in react-native
body: <p>I want to log in to my app using a Microsoft account in react native when a &quot;Login with Microsoft&quot; button is clicked.</p>
  <p>I had used a component called <strong>react-native-msal</strong> but I am getting errors (as shown in the below image). Can anyone help me on this code or any other component where I can log in using Microsoft account using react native
  My code:</p>
  <pre><code>const config: MSALConfiguration = {
    auth: {
      clientId: (i have written my client id here in my code),
      authority: 'https://login.microsoftonline.com/common'
    
    },
  
  };
  const scopes = ['openid', 'profile','user.Read'];
      
   const pca = new PublicClientApplication(config);
  console.log(pca);
  try {
    await pca.init();
  } catch (error) {
    console.error('Error initializing the pca, check your config.', error);
  }
   const params: MSALInteractiveParams = { scopes };
   const result: MSALResult = await pca.acquireToken(params);
  </code></pre>
  <p>Error:</p>
  <p><a href="https://i.stack.imgur.com/qDt8n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qDt8n.png" alt="Error i get when i run the above code" /></a></p>