Questions tagged [cookie-authentication]

100 questions
0
votes
1 answer

ASP.NET MVC Authorize with login authentication not working

I'm trying to implement the cookie auth in my ASP.NET MVC project, and I already code everything based on my research. I really don't know what's wrong. I suspect that the folder hierarchy of my project is off, but it can't be it. But can be the…
0
votes
1 answer

How to force ValidatePrincipal to be called on AuthenticatedUsers even for [AllowAnonymous] actions?

I am using cookie authentication on a new ASP.NET CORE 3.1 project. I have a controller action that is used by both guests as well as authenticated users. Because of that, it is decorated with the AllowAnonymous attribute. The behavior of the action…
0
votes
1 answer

CookieAuthenticationOptions.AccessDeniedPath and LoginPath Redirect stopped working after adding JWT auth

My original configuration was just cookie authentication, and the redirecting for not logged in, or not authorized worked. I then added jwt token auth to use with the api side of our application, and that works, but the redirecting has stopped…
ToddK
  • 765
  • 9
  • 16
0
votes
0 answers

Why is cookie authentication is success even after I deleted the DataProtectionProvider Key from directory in aspnetcore 5.0

I'm looking to implement cookie authentication that work in a multi server environment/webfarm.when I tested this with Dataprotection provider persistkeystofilesystem mapped to a local folder,the key gets created and cookie is also autheticated but…
0
votes
2 answers

Conditional AccessDeniedPath in ASP.NET Core 3.1

My project has two controllers to support users from different roles - Members and Consultants. On sign-in I set the "Role" ClaimType for each. There is a different sign-in page for members and consultants and after sign-in both the MemberController…
Ross Kelly
  • 477
  • 1
  • 6
  • 23
0
votes
0 answers

Do i need to implement JWT in Django?

I am not very fimiliar with authentication but I know that JWT is the best practice and market standard but do I really need to implement JWT in Django can I not use Django built-in cookie-based authentication if not then and what are the advantages…
wetler
  • 374
  • 2
  • 11
0
votes
0 answers

What are the logout from all devices strategies with cookie based authentication?

Which shouldn't also rely on Identity or IdentityServer concepts, maximum a DB Table for storage. Searched around and can't find something like that.
0
votes
0 answers

ASP.Net Core cookie authentication logged in but not authenticated

We are using simple cookie authentication in a ASP.Net Core webapp. The login has worked for almost 3 months now. Then suddenly, a problem started appearing. This is how I setup authentication in Startup.cs: private void…
LeonidasFett
  • 3,052
  • 4
  • 46
  • 76
0
votes
1 answer

Why Page.PreviousPage timedout, is it sessionState timeout or something else?

I am trying to figure out why the following code failed the null check and throw the exception after some time, and I am yet to determin what's the reason for the timeout, which I think it is the reason I got the exception message, it's normally…
Paul L
  • 2,240
  • 5
  • 36
  • 55
0
votes
1 answer

Not all query parameters appearing in return url

I have built a ASP.NET CORE MVC application and use cookie authentication. Below is my code in Startup.cs file. services.AddAuthentication(options => { // these must be set other ASP.NET Core will throw exception that no // default…
0
votes
1 answer

Distinguish between SignOutAsync and SlidingExpiration

I need to distinguish between a logout from a button, which has a SignOutAsync method call and an actual session expire. Is there a way we can do that? This is what I have at the…
taiko
  • 458
  • 6
  • 22
0
votes
0 answers

How to share same .Net core Authentication Cookie between multiple web application hosted in Azure App services

After spending couple of days and trying various solutions reccomended by the community, I still could not find a solution for this issue. I have multiple applications which need to implement single sign-on. All the applicatiions has two projects.…
0
votes
0 answers

Shared cookie authentication not authenticating on server

When deploying two applications (one .net 4.6 the other .net core 2.2) that share an authentication cookie to a web farm environment, the "receiving" app does not authenticate. We have a very large web forms application that we are trying to…
philthyfool
  • 194
  • 2
  • 5
  • 17
0
votes
2 answers

Browser Cache API is not working for cookie authenticated services

I am trying browser Cache API mechanism, but the api which is going to be cached is using cookie authentication. And am receiving 'unauthorized-401' error message. I am suspecting the http cookie supposed to send for all the api request is not…
0
votes
1 answer

Is there a way of manipulating the DOM directly in ReactJs just for showing an iframe?

So I have this pretty much standard ReactJs/Redux project with a backend API. The API is secure, and I'm using cookie auth since the project is supporting various id providers (Azure AD, Google etc which is handled by the backend and produces an…
sedvardsen
  • 73
  • 7