asp.net-core-identity

ASP.NET Core 2.1 Role Manager Register

懵懂的女人 提交于 2020-07-16 05:09:43
问题 In my seeding code I create Users and Roles, and the error seems to be whenever I run it through startup I seem to be getting "No service for type Microsoft.AspNetCore.Identity.RoleManager'1[Microsoft.AspNetCore.Identity.IdentityRole] has been registered. EDIT*** I think the issue is that the code in identityhostingstartup is not getting executed, this was created by scaffolding identity. SeedDb.cs public static void CreateRolesAndUsers(IServiceProvider serviceProvider) { var roleManager =

How to use both Azure AD authentication and Identity on ASP.NET Core 3?

别来无恙 提交于 2020-07-06 12:07:36
问题 The web application should allow internal employees with AD accounts to authenticate in the app using Azure AD Authentication. External users should be able to register and sign in using ASP.NET Core Identity. I can implement each one separately but not together in the same app. When I add both authentications to the same app, the ASP.NET Core Identity works perfectly. I can register and log in using Identity with no problem. However when I try to log in with Azure AD, the app redirects me to

How to use both Azure AD authentication and Identity on ASP.NET Core 3?

喜夏-厌秋 提交于 2020-07-06 12:05:17
问题 The web application should allow internal employees with AD accounts to authenticate in the app using Azure AD Authentication. External users should be able to register and sign in using ASP.NET Core Identity. I can implement each one separately but not together in the same app. When I add both authentications to the same app, the ASP.NET Core Identity works perfectly. I can register and log in using Identity with no problem. However when I try to log in with Azure AD, the app redirects me to

Identity Server 4 - Resource Owner Password Grant and Google Authentication

不想你离开。 提交于 2020-06-27 12:59:12
问题 I have an application that currently uses the resource owner password grant type to allow users to log in via a single page application. The identity server is hosted in the same project as the Web API currently. However, we would like to add the ability for a user to register / log in using their Google account. Currently, the user data is stored in tables and managed by ASP.NET Core Identity. Is there a way to have both the resource owner password grant type available in the application for

.NET Core Identity vs IdentityServer4

泪湿孤枕 提交于 2020-06-24 08:04:55
问题 The question: Should I use .Net Core Identity or IdentityServer 4 with Identity I need to build app with login/register functionality and allow users to use APIs to import/export data from my software. I also want to have external logins like google, twitter, etc. And I'm not able to understand why would I need Identity Server when all things can be done using only Identity. Why would I need or want IdentityServer ? I just need to get work done right and as simple as possible. 回答1: It depends

Unauthorised client when requesting for token using IdentityServer4 .NET Core 3.1

﹥>﹥吖頭↗ 提交于 2020-06-01 07:39:29
问题 I'm trying to get IdentityServer4 to work but unfortunately no luck. I'll explain the issue in more detail. I'm using IdentityServer4 and also .NET core Identity. I have a .net core mvc application which has login page. You basically login with username and password. When you login I need to generate jwt token I'm doing this using the following code: [HttpGet] public async Task<IActionResult> GetClientToken(string clientId, string clientSecret, string grantType, string scope, string username,