You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AddSignIn should be more robust to authority having or not a trailing slash.Β #19
WebApiAuthenticationBuilderExtensions.EnsureAuthorityIsV2_0 was extracted from the WebApiAuthenticationBuilderExtensions.AddProtectedWebAPi method so that we can unit test it. I think it should stay there as this method takes a JwtBearerOptions parameter and It's unit tested.
It provides a more robust processing of authorities accepting them to end in / or not.
We want to do somthing similar for WebAppAuthenticationBuilderExtensions.AddSignIn( this AuthenticationBuilder builder, Action<OpenIdConnectOptions> configureOpenIdConnectOptions, Action<MicrosoftIdentityOptions> configureMicrosoftIdentityOptions, string openIdConnectScheme = OpenIdConnectDefaults.AuthenticationScheme, string cookieScheme = CookieAuthenticationDefaults.AuthenticationScheme, bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false), but with a method enabling an OpenIdConnectOptions.
Only reference I can find to it, so I'll ask here. If you'd prefer I open an issue, then I will.
Following the current guides / tutorials when I attempt to launch my application I get the following error
An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
Microsoft.Identity.Web.AuthorityHelpers.EnsureAuthorityIsV2(string authority)
I figured out the issue in the end. It was a typo in the AppSettings.JSON.
Switching to a local version of the project made the error much more obvious, once I've got things up and running correctly I'll have another go at using the nuget package instead. Thanks for the quick reply though.
wowfood Thanks for the follow-up. I think we can make a better error message, so you don't need to do come here for help. Jean-Marc Prieur (@jmprieur) -> thoughts?
wowfood : just to be sure, in which part (property) of the AppSettings.json did you have the typo? (#66 is for the app secret, but It's not clear fromt this thread that this is where you had the typo?)
It wasn't the secret, I'd mistyped the actual section, instead of calling it AzureAdB2C I'd called it AzureAB2C, so technically the issue was it wasn't finding any of it. I'll be honest, for IDs and stuff I'd much prefer something strongly typed. (But that's a me issue, not a package issue)
Activity
jennyf19 commentedon Apr 22, 2020
included in 0.1.1-preview release
wowfood commentedon Apr 28, 2020
Only reference I can find to it, so I'll ask here. If you'd prefer I open an issue, then I will.
Following the current guides / tutorials when I attempt to launch my application I get the following error
An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
Microsoft.Identity.Web.AuthorityHelpers.EnsureAuthorityIsV2(string authority)
jennyf19 commentedon Apr 28, 2020
wowfood yes, please open another issue here. Can you also include your appsettings.json file (just remove any sensitive information)? Thank you.
wowfood commentedon Apr 28, 2020
I figured out the issue in the end. It was a typo in the AppSettings.JSON.
Switching to a local version of the project made the error much more obvious, once I've got things up and running correctly I'll have another go at using the nuget package instead. Thanks for the quick reply though.
jennyf19 commentedon Apr 28, 2020
wowfood Thanks for the follow-up. I think we can make a better error message, so you don't need to do come here for help. Jean-Marc Prieur (@jmprieur) -> thoughts?
jennyf19 commentedon Apr 28, 2020
Actually, wowfood , we already have an issue tracking this: #66
jmprieur commentedon Apr 29, 2020
wowfood : just to be sure, in which part (property) of the AppSettings.json did you have the typo? (#66 is for the app secret, but It's not clear fromt this thread that this is where you had the typo?)
wowfood commentedon Apr 29, 2020
It wasn't the secret, I'd mistyped the actual section, instead of calling it AzureAdB2C I'd called it AzureAB2C, so technically the issue was it wasn't finding any of it. I'll be honest, for IDs and stuff I'd much prefer something strongly typed. (But that's a me issue, not a package issue)