GithubHelp home page GithubHelp logo

aspnet / aadintegration Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 19.0 620 KB

[Archived] UI and library components for integrating ASP.NET Core applications with Azure Active Directory. Project moved to https://github.com/aspnet/AspNetCore

License: Apache License 2.0

Batchfile 0.32% Shell 5.75% PowerShell 4.14% C# 87.74% HTML 2.05%
asp-product

aadintegration's People

Contributors

aspnetci avatar eilon avatar javiercn avatar natemcmaster avatar pranavkm avatar ryanbrandenburg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aadintegration's Issues

Add simple functional E2E test

We should a have a smoke test that verifies that pages can be hit when the libraries are added and another test that verifies that pages can not be hit when the library is not present.

This can be done after preview2

Please consider splitting this package apart to reduce dependencies

I have a lightweight ASP.NET Core Web API project. It has no front end, and thus doesn't need most of what is bundled with the Microsoft.AspNetCore.Mvc package. I can generally use Microsoft.AspNetCore.Mvc.Core package instead.

Except that I need AAD authentication, and when I pull in Microsoft.AspNetCore.Authentication.AzureAD.UI it takes Microsoft.AspNetCore.Mvc as a dependency...

Looking through the code, it seems like there are some controllers and pre-compiled Razor views being included, so I understand why you need the full Mvc package to support those.

It would be great if you could split out the core AAD auth from the UI components, such that those of us who don't need the UI don't need to take the dependency on the big Mvc package. Something like this perhaps:

  • Microsoft.AspNetCore.Authentication.AzureAD.UI
    • Microsoft.AspNetCore.Mvc
    • Microsoft.AspNetCore.Authentication.AzureAD.Core
      • Microsoft.AspNetCore.Authentication.Cookies
      • Microsoft.AspNetCore.Authentication.JwtBearer
      • Microsoft.AspNetCore.Authentication.OpenIdConnect

Thanks.

ClientId is used by default instead of Audience Id in file AzureAdAuthenticationBuilderExtensions.cs in .Net core 2.0

From @blowdart on September 17, 2018 18:38

From @jatingandhi28 on September 17, 2018 9:38

File name - AzureAdAuthenticationBuilderExtensions.cs
[Note this code has moved here].

        public void Configure(string name, JwtBearerOptions options)
        {
            options.Audience = _azureOptions.ClientId;
            options.Authority = $"{_azureOptions.Instance}{_azureOptions.TenantId}";
        }

However It should be

        public void Configure(string name, JwtBearerOptions options)
        {
            options.Audience = _azureOptions.AudienceId;
            options.Authority = $"{_azureOptions.Instance}{_azureOptions.TenantId}";
        }

Copied from original issue: dotnet/aspnetcore#3538

Copied from original issue: aspnet/Security#1859

SameSite option not being set

I am trying to solve the same problem as described in here: #52

but it keeps addind SameSite.Lax. Here's what I've configured on my Startup.cs:

            services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
                .AddAzureAD(options => {
                    Configuration.Bind("AzureAd", options);
                })
                .AddCookie(options=>
                        options.Cookie.SameSite = SameSiteMode.None
                    );

...

        app.UseCookiePolicy(new CookiePolicyOptions
        {                
            MinimumSameSitePolicy = SameSiteMode.None
        });

Is there any other place that needs the same setting?

iOS 12 Safari breaks ASP.NET Core OIDC authentication

When logging into a site using Azure AD B2C Auth flow on IOS 12 I get caught in an infinite loop between my site and login.microsoft.com.

The application works fine on other browsers and operating systems.

I believe the issue may be related to:

As an interim fix I have set o.Cookie.SameSite = SameSiteMode.None; but this seems like a pretty suboptimal approach.

Is there a better solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.