9,093 questions
0
votes
0
answers
12
views
How to create persistent Cookie from HttpContext's Cookie.Append method?
var token = await _jwtTokenService.GenerateToken(user);
HttpContext.Response.Cookies.Append("accessToken", token, new CookieOptions
{
HttpOnly = true,
Expires = DateTime.UtcNow....
0
votes
0
answers
22
views
Using ASP.Net Core Identity in parallel with OpenIdConnect OAuth2
I'm working on asp.net MVC project based on .NET 8.0. My site is using ASP.Net Core Identity for user authentication. It's working fine.
I have to connect to remote server which is using OAuth2 ...
-3
votes
1
answer
35
views
Could not load file or assembly Microsoft.Owin Version=3.0.1.0
execution of my web applications fails with following runtime error:
Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its ...
0
votes
1
answer
48
views
ASP.NET Core 8.0 Razor Pages and Progressive Web-App (Add to home screen on mobile) does not work properly (with ASP.NET Identity; Antiforgery)
I have an ASP.NET Core Razor Pages Webpage which can be browsed to on smartphones (Android and IPhones).
I use ASP.NET Core Identity to secure access to the site.
My users want to add icons to the ...
-3
votes
1
answer
41
views
Attempting to reset user password when currently unknown saves incorrectly [closed]
This app has an admin section where if the user forgets their password and would rather the admin reset it than go through the email reset/confirmation process the admin should be able to change it. I ...
0
votes
0
answers
19
views
After adding custom password validator lockoutOnFailure stopped working in ASP.NET Identity
I have several settings related to password complexity, and their values can change dynamically from another server. To handle this, I implemented a custom password validator that reads the settings ...
0
votes
0
answers
21
views
Using ASP.Net Core Identity for Razor page web app and MAUI app
I've got a razor pages/mvc web app that uses ASP.Net Core Identity for authentication and authorization. I'm starting to develop a mobile app version of the site using MAUI and wanting to access many ...
0
votes
0
answers
63
views
User API-key authentication in Microsoft.AspNetCore.Identity
The scenario:
A web application built using latest asp.net core
Uses Microsoft.AspNetCore.Identity for cookie-based authentication
Users can log in with username/password
Users can log in with ...
0
votes
0
answers
19
views
How can I configure OpenIdDict for local token validation?
I use the library OpenIDDict (version 5.*) to work with the token. I have an authorization server that works with tokens. And there is also another regular service, now it works as a client. Sends a ...
2
votes
1
answer
75
views
How do I get my ASP.NET Core minimal API to return a 401 if the user is not authenticated instead of redirecting to the log-in page
I have an ASP.NET Core Blazor web app, which uses Identity for authentication. The server project's Program.cs contains the following (rather trivial) endpoint...
app.MapGet("/testapi-time", ...
0
votes
1
answer
28
views
How to remove the User Name Field from the identity user in asp.net core 8
I want to remove the UserName field from the IdentityUser
I don't want to use it
1
vote
1
answer
92
views
Implementing External Login does not set IsAuthenticated to true unless I refresh the page
I have implementing external login in my NET Core 8 web application.
Ths is the callback method:
[AllowAnonymous]
[HttpGet("ExternalLoginCallback")]
public async Task<IActionResult> ...
-1
votes
1
answer
35
views
How to use an identifier other than "email" for users in Firebase Authentication + OIDC
I've set up Firebase Authentication for my app with an OIDC provider. In this OIDC provider, the email address isn't required to be unique. For instance, users from the same company could share their ...
-1
votes
1
answer
25
views
Argument type is not assignable to parameter type problem in IdentityDbContext
I am currently using .Net Framework Identity
And been following a video tutorial.
namespace SwmmDashboard
{
public class AppDbContext : IdentityDbContext
{
public AppDbContext(...
1
vote
1
answer
21
views
CreatedAtAction for a Post request of register
I have an AuthController class with a register Post request:
public class AuthController(UserManager<User> userManager, IMapper mapper) : BaseApiController
{
[HttpPost("register")] ...