fmichellonet/AzureFunctions.Extensions.OpenIDConnect

Azure AD B2C authentication

Closed this issue · 6 comments

Hi! I have a question. Could I somehow configure to authenticate b2c token with your package?
Thank you in advance.

Hi @Kanilz , you might want to define audience, issuer, issuel url.
I have no access to an Azure AD B2C but this should not be very different from "normal" Azure AD

var audience = Environment.GetEnvironmentVariable("OpenIdConnect_Audience");
var issuer = Environment.GetEnvironmentVariable("OpenIdConnect_Issuer");
var issuerUrl = Environment.GetEnvironmentVariable("OpenIdConnect_IssuerUrl");
services.AddOpenIDConnect(config =>
        {
            config.SetTokenValidation(TokenValidationParametersHelpers.Default(audience, issuer));
            config.SetIssuerBaseUrlConfiguration(issuerUrl);
        });

Hi @fmichellonet, is it possible to configure token validation for example adb2c and another custom validation? So I could pass 2 types of token on validation.

Hi @Kanilz I'm sorry but this use case is not supported yet. Completely doable but just not implemented.

@fmichellonet should I rename that issue(or create new one) for that use case or I could just close it? Because you explanation is enough for me thank you.

It would be nice to create a new one to track multi scheme authentication.
I close this one.