Questions tagged [msal-react]

113 questions
0
votes
0 answers

Safari iOS opens new window when clicked on email link

To better understand the flow, for the login/sign-up part, I am using Azure integration. @azure/msal-browser, @azure/msal-react The thing is, that by signing up, the user gets an email to confirm an email. In the Google Chrome case, it is being…
Mantofka
  • 206
  • 1
  • 12
0
votes
0 answers

ASP.NET Core / React Authentification using Azure AD and Msal

I am trying to secure my ASP.NET Core Web API and access it with my React client app. I followed the solution posted by Tiny Wang, that helped me to understand the context. Now I am still unable to call the API, I always get a 401 authentication…
0
votes
0 answers

No accounts found in useMsal hook when using loginRedirect

I'm trying to use MSAL to authenticate users. If I authenticate using instance.loginRedirect()the value of accounts from calling useMsal() is always an empty array, but is correctly populated if I use instance.loginPopup(). My Login component is as…
Frosty619
  • 1,381
  • 4
  • 23
  • 33
0
votes
1 answer

ClientAuthError: state_mismatch: State mismatch error. Please check your network. Continued requests may cause cache overflow

I use msal-browser v2.37.1 with Nuxt3 /Vue3 and it works totally fine in most cases. It works fine when the window.location url looks like this: https://test.com or https://test.com/user/2?page=profile but shows for some reason, when I add an…
RPES
  • 1
  • 2
0
votes
1 answer

SSO login with Azure AD using React JS

I'm facing an issue with Cross-origin token redemption while developing a Single-Page Application (SPA). I'm getting the following error: "Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type. Request origin:…
0
votes
1 answer

How to set prompt dynamic in input claim custom policy when login as google in azure ad b2c

I have implemented authentication using azure ad b2c and use custom policy to manage the user journey. I have google login idp and have some input claims login hint and prompt to manage the auth session. I have 2 different application which is…
0
votes
0 answers

Pass MSAL Authentication Token to API

I have a React app that successfully logs into the Azure AD. After logging in, I would like to pass the token to an Azure Function to query the Graph API. However, the token is not valid in the Azure Function. What do I need to do to pass a…
alexohneander
  • 519
  • 3
  • 7
  • 22
0
votes
1 answer

Cannot read property 'createPublicClientApplication' of null in react-native-msal

I am trying to configure the Azure AD B2C application for react native and using this lib for react-native. when trying to call init() it gives error Cannot read property 'createPublicClientApplication' of null. below is the MSAL config auth: { …
Nandan
  • 1
  • 3
0
votes
1 answer

Reach Forgot Password programatically with MSAL-React

I have a working b2c/msal setup, I do not use the popup, but instead use the aquireTokenSilent method. I wanted to create a reset password button/link on my website, that a user can click and be sent into the b2c password reset flow. Ideally, i can…
0
votes
0 answers

msal-browser getAllAccounts() returns an empty array

I am facing a problem when i am trying to get the accounts that have already logged in in the browser. In my index.tsx file i am doing this import { AccountInfo, PublicClientApplication } from "@azure/msal-browser" const msalInstance:…
Riccardo
  • 3
  • 4
0
votes
0 answers

fetch return [object promise] instead of data even after using then in authConfig.js in MSAL-React

I'm using msal-react in my application. I want to get the clientId from an api (http://localhost:7071/api/api). Fetch returns [Object promise]instead of actual data. In the console it printed correctly. However, I am not sure where it went…
Lakshmi
  • 85
  • 12
0
votes
0 answers

Can we enable local authentication in a React SPA which already supports Azure AD login?

I have a React SPA which authenticates users using msal-react. So far, the Azure AD authentication is working fine but now I need to enable local authentication. The flow will be somewhat like below: User enters the login page url. A form loads…
0
votes
1 answer

Which application should I register in Azure Active Directory B2C?

I am starting to develop a project where I am planning to use Azure AD B2C for Identity service to provide and handle authentication, Facebook login, .NET for my Web API, probably React or Vue for front-end, and Microsoft SQL for the database. My…
userMB
  • 13
  • 3
0
votes
1 answer

Can We Create Custom Login Page In Azure AD B2C (User Flow or Custom Flow)

I haved an ReactJs app that I want to use AAD B2C to manage Identity for my users. I created the AAD B2C tenant, then registered application type SPA, then I can login using this example repo:…
Nam Nguyen
  • 125
  • 2
  • 8
0
votes
0 answers

Use msal-react with multiple instances/providers (Azure AD and Azure B2C)

I have a react app using Azure B2C for user registration/login (with msal-react). Now I also need to add login for internal users with Azure AD, but I don't see any way to add multiple msal instaces in the same app. I have the normal setup: const…
mlidal
  • 1,111
  • 14
  • 27