I have a site with frontend
and admin panel
. Both have login page and user should be able to login on both frontent
and admin panel
with different user. By default User.Identity.IsAuthenticated
is used to check if user is currently logged in, I want something like User.Identity.IsAdminPanelAuthenticated
. So if a user only logged in on admin panel
but not on frontend then IsAuthenticated
will return false
but IsAdminPanelAuthenticated
will return true
.
Asked
Active
Viewed 144 times
0

tickwave
- 3,335
- 6
- 41
- 82
-
How do you determine if they are an Admin? – Erik Philips Jun 29 '15 at 03:02
-
I have claims and custom authorize attribute to do that – tickwave Jun 29 '15 at 03:04
-
Same website/project or two different websites? – Erik Philips Jun 29 '15 at 03:14
-
same project and same domain. I know I should've gone with different project because it causes me a lot of problem so far. I didn't know it's not possible to use more than 1 instances in ASP Identity like previous Membership framework when I started the project. – tickwave Jun 29 '15 at 03:17
-
I wouldn't recommend doing that. I don't really understand your logic. If a user is logged in to a website, then the user is logged in. It doesn't matter how you've sectioned off your website. – Erik Philips Jun 29 '15 at 03:22
-
no because I want to separate between frontend and admin panel because both is using different database. Admin panel is for employee to configure content on frontend, while frontend is for enduser. – tickwave Jun 29 '15 at 03:28
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/81827/discussion-between-erik-philips-and-warheat1990). – Erik Philips Jun 29 '15 at 03:38