How to use Asp.net idenity with .net core and mysql database? - asp.net-core

I Created application using asp.net core with mysql database.
Right now, I need to implement authentication and i want to use Asp.net idenity.
But i not able to found any proper integration of asp.net identity with mysql database.

I was able to use MySQL with Identity in this project : https://github.com/aguacongas/chatle
Read Startup.cs on branche release/1.1.1 if you want a sample with .Net Core 1.1
Use the dev branch for .Net 2.0

Related

Is Asp.Net Core Identity suitable for Grpc service

We need to build a Grpc service, which must feature users, external login, sign-in/sign-out, roles, etc. We plan to use EF Core for our database, so we consider using ASP.NET Core Identity for all that "user stuff".
Will Grpc work nicely with ASP.NET Core Identity? I just found out that Microsoft suggests not to use their Identity framework for web APIs (mentioned here: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity). So did I misunderstand them, or are there pitfalls in that approach?

Feed Reports from ASP .NET API to an ASP .NET Core app

Is it possible to feed reports to my asp net core application using a simple Web API in .net framework? Since there's basically no solution for reportings in ASP .NET Core and we rely mostly on Crystal Reports, I was wondering if this is possible
It may be a bit difficult that if you directly reference asp.net web api in asp.net core due to the framework between asp.net and asp.net core is completely different .
If you want to create reports in ASP.NET Core , you could try a third party solution as a supported product:
https://www.syncfusion.com/reporting-tool/aspnet-core/report-viewer
And not quite sure about your report output format, if you try to generate PDF output, as alternative you may use wkhtmltopdf (command line tool) to for this purpose , you could refer to here for more details.
Another discussion on the report in asp.net core ,you also could refer to .

Host ASP.NET Core in a Windows Service with Identity framework

Looking at Host ASP.NET Core in a Windows Service, I downloaded the sample and got it to work fine.
How would I add ASP.NET Core Identity to this sample window service ? it seems using a windows service is the recommended way to host an ASP.NET Core app on Windows but I can't find any information on adding Identity ..
Thanks!
IT's not as simple as just adding it. I would suggest, you create a new projekt (from template) with identity and then migrate those implementations to your project.
In core 2.1, you could add a library with identity and yous scaffold the pages you need to edit. Adding Identity in core 2.1

.Net 4.6 equivalent of .NET Core Identity password hashing

I have a requirement where I need to be able to create a user via a ASP.NETCore based web application and also via a windows application(.NET 4.6). The same user could be used to login to both the Web Site and the WindowsApp. The credential store used is a SQL Server database. I am using ASP.NET Core Identity with the default PasswordHashing implementation for the Web Application. But the problem that I am having is in trying to replicate the same PasswordHashing algorithm when creating users via the WindowsApplication. What is the easiest way to achieve this?
You can configure the ASP.NET Core Identity PasswordHashing implementation to use the V2 version - thus aligning with the behaviour of Identity 2 (that I'm guessing you're using in the .NET framework Windows app).
In the startup.cs of the web application, add this line:
services.Configure<PasswordHasherOptions>(options => options.CompatibilityMode = PasswordHasherCompatibilityMode.IdentityV2);
All passwords created through web will have to be reset.

.net core and SAML 2.0

Our University has migrated to a SAML based authentication/authorization method using Shibboleth.
I have been researching for at least a day on how to use SAML with .net core web applications. I can't use Identity server 4 because it is for OaTH/Open ID. I found some documentation on msdn which points to a commercial implementation. I came across this SO answer from a year ago saying Kentor may support it in the future but couldn't find anything on the github page about support for .net core or a .net core sample web app. As of January it was still planned but no date.
The University has the identity provider running. What I don't understand is the following:
How do I set my web application to use that identity provider?
How do I check if that identity provider has already been authenticated for another application, so SSO use?
Also, any sample applications that use SAML without commercial plugins would be greatly appreciated.
ITfoxtec has a ASP.NET MVC Core 1.0 SAML2 plugin, but it requires the .NET Full Framework, and won't run on linux. There's some missing APIs that are preventing full .NET Core support right now for SAML2 (around Crypto XML namespace). https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2
Not exactly what you're looking for I know, but it's an interim solution until probably .NET Standard 2.0, which will probably bring the missing API's to .NET Core.
ITfoxtec Identity Saml2 support .NET Core 2.1 (without the .NET Framework) from version 3.0.0. Project: https://itfoxtec.com/IdentitySaml2
ITfoxtec Identity Saml2 MVC Core support ASP.NET MVC Core 2.1. NuGet package: https://www.nuget.org/packages/ITfoxtec.Identity.Saml2.MvcCore/