# How to check if user session is active from back-end server?

**URL:** <https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983>\
**Category:** Get Help\
**Tags:** sessions, logout\
**Created:** [January 9, 2025, 4:51am UTC](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983 "2025-01-09T04:51:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shy.aberman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shy.aberman/32/48833_2.png) [@shy.aberman](https://community.auth0.com/u/shy.aberman)\
**Post date:** [January 9, 2025, 4:51am UTC](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983/1 "2025-01-09T04:51:29Z")

</div>

We use `auth0-react` for our front-end UI and `node-auth0` for our back-end. The front-end passes an access token to the back-end to authenticate and authorize any operations.

We only use the session capabilities provided by Auth0 via `auth0-react`; our system has no separate implementation of “session”.

We would like the back-end to forbid access after a user has logged out.

As per the Knowledge Article [“Invalidating an Access Token after User Logout”](https://community.auth0.com/t/invalidating-an-access-token-after-user-logout/101398):

> This is why an Application should be configured to check Auth0’s session.

What are some ways that our back-end can check Auth0’s sessions?

I tried using `node-auth0`’s `SessionsManager` via `ManagementClient` ([docs](https://auth0.github.io/node-auth0/classes/management.SessionsManager.html)), but that seems to only be available on the Enterprise tier.

Thanks!

SDK Versions:

- `auth0-react`: 2.2.4
- `node-auth0`: 4.16.0

---

<div class="post-metadata">

**Author:** ![shy.aberman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shy.aberman/32/48833_2.png) [@shy.aberman](https://community.auth0.com/u/shy.aberman)\
**Post date:** [January 9, 2025, 4:52am UTC](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983/2 "2025-01-09T04:52:38Z")

</div>

FYI, a similar question was asked but not answered here: [How to check if user session is active from Express API?](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-express-api/60262)

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 31, 2025, 6:15pm UTC](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983/3 "2025-01-31T18:15:41Z")

</div>

Hi @shy.aberman

Welcome to the Auth0 Community!

I’m sorry for the late response. To validate session from the back-channel, our recommended way is to use the `GET /api/v2/sessions/{sessionId}`[Manage User Sessions with Auth0 Management API](https://auth0.com/docs/manage-users/sessions/manage-user-sessions-with-auth0-management-api#user-resource).

Alternatively, you might find our OIDC Back-Channel Logout feature interesting since it allows your backend to subscribe to logout events. → [OIDC Back-Channel Logout](https://auth0.com/docs/authenticate/login/logout/back-channel-logout)

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![shy.aberman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shy.aberman/32/48833_2.png) [@shy.aberman](https://community.auth0.com/u/shy.aberman)\
**Post date:** [January 31, 2025, 7:53pm UTC](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983/4 "2025-01-31T19:53:45Z")

</div>

Thanks for the reply.

To clarify, both possible approaches are only available via the Enterprise pricing tier. How do lesser tiers check if there is a valid Auth0 session?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 14, 2025, 7:53pm UTC](https://community.auth0.com/t/how-to-check-if-user-session-is-active-from-back-end-server/167983/5 "2025-02-14T19:53:59Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
