Skip to content

Conversation

@mjrousos
Copy link
Member

@mjrousos mjrousos commented May 3, 2022

This just adds cookie-based auth using Microsoft.AspNet.Identity.Owin to the SystemWebAdapters sample app. Having this in the sample will be useful as we start working on solutions to enable sharing auth between ASP.NET and ASP.NET Core apps.

Note this doesn't actually add any code to enable that sharing - it just adds auth to the ASP.NET app only (signin will work and be respected from ASP.NET endpoints but not ASP.NET Core ones) as a starting point to build on in future PRs.

@mjrousos mjrousos requested a review from twsouthwick May 3, 2022 20:45
@twsouthwick twsouthwick requested a review from Tratcher May 3, 2022 21:41
public partial class Startup
{
// For more information on configuring authentication, please visit https://go.microsoft.com/fwlink/?LinkId=301864
public void ConfigureAuth(IAppBuilder app)
Copy link
Member

@Tratcher Tratcher May 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to need different samples apps for each auth scenario, none of the different auth types are compatible.

The ones we wanted to start with were JWT and OpenIdConnect. Microsoft.AspNet.Identity is one of the harder scenarios to do interop for since there's a user database to deal with.

The owin cookie interop package would be used with both OpenIdConnect and Identity.

Copy link
Member Author

@mjrousos mjrousos May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, we'll definitely need multiple samples here soon. I've updated this with identity for now because that's the scenario that I think would be most beneficial to learn about first.

I'm expecting JWT will be pretty trivial. On the other hand, it seems like Identity should be doable with the owin cookie interop package but there are still a lot of unknowns in that scenario (for me at least), so I'd like to play around with it first.

@Tratcher Tratcher merged commit 2087d7a into main May 5, 2022
@Tratcher Tratcher deleted the mikerou/aspnet-auth branch May 5, 2022 15:03
twsouthwick added a commit that referenced this pull request Feb 27, 2024
Fixes #461

Related Work Items: #4
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

Successfully merging this pull request may close these issues.

4 participants