Questions tagged [asp.net-authentication]

Questions regarding ASP.NET identity authentication methods

ASP.NET, in conjunction with Microsoft Internet Information Services (IIS), can authenticate user credentials such as names and passwords using any of the following authentication methods:

  • Windows: Basic, digest, or Integrated Windows Authentication (NTLM or Kerberos).

  • Forms authentication, in which you create a login page and manage authentication in your application.

  • Client Certificate authentication

ASP.NET controls access to site information by comparing authenticated credentials, or representations of them, to NTFS file system permissions or to an XML file that lists authorized users, authorized roles (groups), or authorized HTTP verbs.

ASP.NET Web Application Security

185 questions
2
votes
1 answer

How to show a popup box when user click Login on LoginStatus Control asp.net?

I have a login status control on master page. If the user has not logged in to the site, the login status control will show "Login" and if a user click on "Login" it usually redirect to Login.aspx or whatever we set in web.config rite? I would like…
2
votes
2 answers

How to use forms authentication without login control?

How to use forms authentication without login control.I don't want to use asp.net login control in my site.But i have to implement forms authentication and to validate users in my database.
1
vote
0 answers

Firebase Auth and JWT Authentication in Flutter and C#

I need help understanding how different components fit together. Currently, I'm working on an app with a friend. He's using Flutter for the frontend, while I'm building APIs with C#. We've successfully implemented email and password-based account…
1
vote
1 answer

HttpContext.User.Identity.IsAuthenticated is false after calling HttpContext.SignInAsync("schema-name", claimsPrincipal);

I am using multiple authentication schemes. Here is my Startup.cs code - public void ConfigureServices(IServiceCollection services) { //code services.AddAuthentication(options => { …
1
vote
1 answer

Invalidate all authentication cookies in ASP.net CORE 3

On ASP.net CORE 3, when a user logout, I would like to invalidate all the cookies that exist on different devices. The user might have logged in from several different browsers, and the user has the option to use "Remember me" that lasts 30 days. My…
1
vote
0 answers

.NET 6 Web API - Windows Authentication & Authorization At Application Level

I have implemented the below scenario successfully using .NET Framework, Windows Authentication, ASP.NET Impersonation, and SQL Server Row-Level Security. My goal with this question is to determine how to migrate this to .NET 6. The current flow…
1
vote
1 answer

Asp.net 6 Authorization. I have the ability to send the client a JWT but when I try access my end points I get 401. Very Confused

I am trying to unlock my endpoints (Controllers) with my JWT token that is sent to the user when they login. At the moment the register and login works and the user is sent a JWT token. However when I use postman or my Mobile application to send the…
1
vote
2 answers

ASP.NET Core : Return Json response on Unauthorized in a filter at the controller/action level

I am not using Identity. I have this ASP.NET Core configuration enabling two authentication schemes, cookies and basic auth: services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) .AddCookie(options => { …
1
vote
0 answers

Create Blazor Server Login Page to fetch Jwt

We have a Blazor server app which is packaged as an electron desktop app. Identity cannot reside alongside the app it must be remote so I decided to use Jwt. I have created a Jwt server & have JwtBearer middleware enabled in the Blazor server app…
tinmac
  • 2,357
  • 3
  • 25
  • 41
1
vote
1 answer

ASP.Net 5 authentication with Azure - claims seemed to have changed

Briefly Should I be using OpenIdConnectDefaults.AuthenticationScheme when authenticating with Azure ADFS? In more detail I have an ASP.NET Core application that has recently been upgraded from 3.1 to .NET 5. Previously, it had been using the…
1
vote
1 answer

Facebook login with Giraffe

I'm trying to convert my MVC app to Giraffe, but there is one final boss: Facebook login. I've been able to get every part working except for the challenge: public IActionResult ExternalLogin(string returnUrl = null) { …
severin
  • 5,203
  • 9
  • 35
  • 48
1
vote
0 answers

Role Based Authorization not working .NET Core 3.0

Role-Based Authorization not working in my code, Please guide me if i am missing anything. My project is on .net core 3.0 framework. Authentication is working fine but authorization is not working. public class Startup { public…
1
vote
1 answer

ASP.Net Core Bearer Authentication + flutter client

I have a problem with Bearer Authentication in ASP.NET Core 3.1 Web Api project. I configured authentication like that: services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => { …
1
vote
1 answer

sending endsession request to identityserver throws error

I have a ASP.NET MVC application with framework 4.7.2. The application is configured to use IdentityServer3 using OpenIDConnect. When user clicks on Logout button the following code is invoked Action Method The logout action method get invoked…
1
vote
0 answers

OAuth .NET Core - to many redirects after sign in with custom options - Multi Tenant

I'm trying to implement OAuth per tenant. Each tenant has their own OAuthOptions. I overwritten OAuthOptions and with IOptionsMonitor i resolve the OAuthOptions every time. Based on this answer: openid connect - identifying tenant during login But…