Page 1 of 1

Check if ANM user is logged in from parent website

Posted: Wed Jul 10, 2024 2:35 pm
by Andros

Hi.
I have a website (.NET CLR v4.0.30319) and inside an ANM web application that I use for user account.
So users can navigate the website, and then access then ANM web app to access their user account with some personal info.
I need to know even in the website if the user is logged in in the ANM web app.
How can I do this? Whats' the best practice?
From the website I can't access the ANM webapp, so I think that I have to check the login cookies, session id or something else...
Any idea?


Re: Check if ANM user is logged in from parent website

Posted: Thu Jul 11, 2024 7:26 am
by MichaelG

If you have enabled the Force logout user option, you should be able to see the list of active users when you log in as the hard code super admin.


Re: Check if ANM user is logged in from parent website

Posted: Thu Jul 11, 2024 3:08 pm
by Andros

Ok thank you. I'll check it.
But what about the standard cookies/session check method? Can I check the validity of the browser's session outside the ANM app, in the same browser session?


Re: Check if ANM user is logged in from parent website

Posted: Fri Jul 12, 2024 7:44 am
by MichaelG

It is not a simple task to look at the ASP.NET Core authentication cookie / session. You may want to google for "check ASP.NET Core session or cookie from external application" for solutions.