All Questions
Tagged with asp.net-core asp.net-core-identity
793
questions
0
votes
0
answers
35
views
Is it safe to move scaffolded Identity pages from Areas\Identity\Pages to main site's Pages?
I have a Razor website built with ASP.NET Core 8 and the Identity framework. I have scaffolded the Identity pages, and they seem to work fine. But I don't like their paths - "/Identity/Account/...
1
vote
1
answer
103
views
ASP.NET Core Identity ApplicationUser Foreign Key Returning NULL
I have an old ASP.NET MVC project that uses Identity/SQL Server which has worked fine for over a decade and am now attempting to begin a new version that uses ASP.NET Core.
I have extended the ...
1
vote
0
answers
41
views
ASP.NET Core 5 Identity reset password token is randomly invalid
Using IdentityServer4 + ASP.NET Core Identity with .NET 5.
Our password reset endpoint throws errors, however, if I re-send the request a few times (the exact same request), it works again.
Here's a ...
0
votes
0
answers
35
views
How to add identity in ASP.NET Core using database-first approach
I am building the project in which I created the database tables in SQL Server and then I scaffolded the database, and the DbContext is created after scaffolding.
Now I want to add identity tables ...
1
vote
0
answers
38
views
How to implement two-factor authentication in SPA application with ASP.NET Core 8.0 identity as backend
I'm trying to use all the new features in ASP.NET Core 8.
I'm using this code
using IspH2H.Engine;
using IspH2H.Engine.Entities;
using IspH2H.WebAPI.Security;
using Microsoft.AspNetCore.Authentication....
0
votes
1
answer
62
views
ASP.NET Core JWT and Identity - Program.cs configuration
I am developing an ASP.NET Core 8.0 project. I use Onion architecture in my project. I use both JWT and Identity as security. When I generate tokens on the API side and send a request from postman, I ...
0
votes
0
answers
23
views
ASP.NET Core 8.0 Identity claim reverts after calling RemoveClaim
When I try to remove an ASP.NET Core 8.0 identity claim (for a different user than is currently signed in), the claim seems to be removed, but then it reverts back to the original value.
The setClaim ...
1
vote
1
answer
39
views
ASP.NET Core - adding roles to identity causes build error
I'm trying to read app roles from the IdentityUser in an ASP.NET Core application.
Per Microsoft's Documentation I've added this to my program.cs:
builder.Services.AddDefaultIdentity<IdentityUser&...
0
votes
1
answer
43
views
How to redirect unauthenticated users to another website?
I am implementing some kind of SSO using cookie sharing in an ASP.NET Core MVC application. I want unauthenticated users in my app website (e.g. app.company.com) get redirected to my SSO website in ...
0
votes
1
answer
59
views
How can I implement role-based authorization in a React & ASP.NET Core project? [closed]
I used ASP.NET Core Identity in my project.
Project repository :
https://github.com/hmahdavi921/ReactTypeScriptApp1
Programs.cs file :
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore....
0
votes
1
answer
84
views
How to remove registration completely in ASP.NET Core 8.0 with Entity Framework Core?
I am building an application in which only admin can add student or teacher. I don't want anyone to register as a student or teacher. I am using ASP.NET Core 8.0 along with Entity Framework Core.
I ...
0
votes
1
answer
137
views
Manage Multiple JWT Bearer Token for an ASP.NET Core Web API
I'm trying to register 2 .NET Identity Authentication to the same API. I plan to add more in the future.
The idea is to use a first identity to authenticate the API users (the different branches of ...
0
votes
0
answers
52
views
ASP.NET Identity : ExpireTimeSpan at server not working
I used ASP.NET Identity and at this time have a problem.
My problem is that ExpireTimeSpan is not working at the server.
My Program code is
builder.Services.AddIdentity<IdentityUser, IdentityRole&...
0
votes
1
answer
111
views
Unable to implement Google Authentication with .Net 8 MVC
I am learning google login feature in .net and implemented it in my sample test application which uses .Net 8 MVC and SQLite DB.
Everything works as expected except the await _userManager....
0
votes
1
answer
40
views
Unable to Select Custom User Class in Identity Scaffolding
I'm trying to scaffold identity pages (Login and Register) in my ASP.NET Core application. However, when I select the pages and my DbContext class, I cannot select my custom user class, ...