Skip to content

Conversation

@vbornand
Copy link
Contributor

Summary of the changes

  • Don't get AzureADOptions if the class is called for another cookie scheme not related to AzureADUI.

Addresses #13311

@Pilchie Pilchie added the area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer label Aug 22, 2019
@Tratcher Tratcher self-assigned this Aug 22, 2019
@Tratcher Tratcher added this to the 5.0.0-preview1 milestone Aug 27, 2019
@Tratcher Tratcher merged commit b242d54 into dotnet:master Aug 27, 2019
@Tratcher
Copy link
Member

Thanks. I'll cherry pick this back to release/3.0 and contact shiproom.

Tratcher added a commit that referenced this pull request Aug 27, 2019
* Skip getting AzureAdOptions for not AzureADUi Cookies scheme #13311 (#13327)

* Also check Azure Jwt options for #13311
@Tratcher Tratcher modified the milestones: 5.0.0-preview1, 3.0.0 Aug 27, 2019
@StefH
Copy link

StefH commented Sep 25, 2019

Is this fix already present in the current 3.0.0 NuGet?

@Tratcher
Copy link
Member

@StefH yes, see #13480

@ivan-sedlak
Copy link

I have the same issue getting error "Microsoft.Extensions.Options.OptionsValidationException: The 'Instance' option must be provided."

It works with ".AddCookie()" but failing with ".AddOpenIdConnect()"

services.AddAuthentication()
.AddOpenIdConnect("okta", "Okta", options => Configuration.Bind("Okta", options));
.AddAzureAD(options =>
{
options.Instance = "https://login.microsoftonline.com/";
options.Domain = "tenant.com";
options.TenantId = "xxxx";
options.ClientId = "xxxx";
options.CallbackPath = "/signin-oidc";
});

@Tratcher
Copy link
Member

@ivan-sedlak OIDC is covered by a different code path.
https://github.com/dotnet/aspnetcore/blame/master/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOpenIdConnectOptionsConfiguration.cs#L25-L28
If you're having an issue with that then please open a new bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants