shawnwildermuth / DualAuthCore

An example of using Dual Authorization in ASP.NET COre 2
Apache License 2.0
101 stars 39 forks source link

different from official document #2

Closed maxisam closed 6 years ago

maxisam commented 6 years ago

in the document here https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x#cookie-based-authentication

When using cookie with .net core identity

Invoke the AddIdentity method in the ConfigureServices method to add the cookie authentication services.

But the way you do is different.

Could you explain the difference? Thx

shawnwildermuth commented 6 years ago

Because i'm using two different auth types, we need to configure them separately. If you just call AddIdentity you're getting cookie by default, but I need cookie and JWT.

maxisam commented 6 years ago

Well, how about call addIdentity and AddJwtBearer? I tried it and it seems like it works too.