-
Notifications
You must be signed in to change notification settings - Fork 27
Getting AADSTS70002: The provided request must include a 'client_secret' input parameter in the sample project #30
Comments
Ok I found the reason, the APP I registered is "Web APP", it will work if I change it to "Single Paged App" |
Thanks mate that helped me a lot |
Commenting to seek any sort of clarification on this matter. Why is this the case? Is there no way around this issue other than registering the app as a SPA? |
@andyhong0122 so this is because msal-browser library is using authorization code with PKCE flow for authentication, which requires a special setup on Azure AD's part, so this new "Single-page application" platform is introduced. And yes it's the only way (unless you want to use implicit flow, which msal-browser does not support, and I won't recommend anyway) |
@derisen Thanks, my project is using React as frontend and .NET as backend and deployed as a web app. I was not able to find any documentation on implementing msal for this structure so was having a tough time. |
@andyhong0122 make sure to take a look at these samples here and here. We usually pair React with Node.js, but there's lots of .NET examples as well. |
I am developing this in my localhost using PHP . is there anyway around it. without changing from web app to single paged application ?? |
@jatuAbdullah did you find any solution? |
Library
@azure/msal-browser": "^2.1.0
Description
Trying to do OAuth with react SPA as the sample project demonstrated, but getting the following error message.
The react SPA project in the sample mentions no client secret, and only client ID is required. I registered my SPA APP and fulfilled the
authConfig.js
with info provided in AAD, and logged in via the following code:The popup window displayed correct stuff and asked me if I agree to allow my APP to access my data. But after my confirmation, the login progress failed with the following error message.
Wondering Is there something I missed or doing wrongly in configuring the sample project?
Error Message
The text was updated successfully, but these errors were encountered: