Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last merges contained some bad changes #6

Open
LXBdev opened this issue Apr 27, 2021 · 4 comments
Open

Last merges contained some bad changes #6

LXBdev opened this issue Apr 27, 2021 · 4 comments

Comments

@LXBdev
Copy link

LXBdev commented Apr 27, 2021

Just some quick notes because I just pulled the last version and was unable to use it. Going back to an earlier one for now, may take a look at the issues later.

  • B2CPolicyManager.exe.msalcache.bin must not be checked in for the bin folder, it is a system local file and the app will crash on other systems on login
  • The new MSAL version fails to login with "no reply urls configured for this app", while the same AAD app still works with the previous ADAL version. Maybe the readme needs to be updated?

@PramodKumarHK89 fyi

@PramodKumarHK89
Copy link
Contributor

@LXBdev : First issue can be handled in the next check in. Regarding the second issue, could you please make sure that, you have the reply url "https://b2capi.com" is present under native platform in your app registration ? (Step number 5 in read me) I understand that, previous worked for you, but there is no change in the code as such which could effect the effect the redirect uri.

ADAL implementation
authResult = await ADALIdentityClientApp.AcquireTokenAsync("https://graph.microsoft.com", Properties.Settings.Default.V2AppId, new Uri("https://b2capi.com"), new PlatformParameters(PromptBehavior.Auto));

MSAL implementation

_app = PublicClientApplicationBuilder.Create(Properties.Settings.Default.V2AppId)
.WithAuthority(authority)
.WithRedirectUri("https://b2capi.com")
.Build();

@LXBdev
Copy link
Author

LXBdev commented Apr 27, 2021

@PramodKumarHK89
Thanks for investigating.
As a background info: I have a new computer and reused the AAD app from my previous application.
I was unable to login. Going back to the previous commit, everything works now. Also if I go to the newest commit now, login works as well. So I am unable to reproduce this at the moment, maybe it will happen again if I use new credentials.

@PramodKumarHK89
Copy link
Contributor

@LXBdev : I tried the app with new registration however, I could not reproduce either. I have created PR by removing the msal cache from bin folder. That should address the first issue.

@alasdaircs
Copy link

alasdaircs commented Aug 13, 2024

Related to "removing the msal cache from bin folder" - in general .NET projects have a standard .gitignore that excludes all nested obj & bin folders that contain build output and also the .vs folder that can contain private stuff. I suggest you consider creating a blank C# project in Visual Studio and copy its .gitignore. Also you have directly bundled Newtonsoft.Json as a binary instead of referencing it using NuGet. If I can find time I'll submit a PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants