# Logout users

**URL:** <https://community.hubspot.com/t/logout-users/83983>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [June 23, 2023, 10:47am UTC](https://community.hubspot.com/t/logout-users/83983 "2023-06-23T10:47:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSivanesan](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@SSivanesan](https://community.hubspot.com/u/SSivanesan)\
**Post date:** [June 23, 2023, 10:47am UTC](https://community.hubspot.com/t/logout-users/83983/1 "2023-06-23T10:47:55Z")

</div>

Hi, I have configured Auth0 as Idp for sso with hubspot crm portal. Now i would like to find a way to logout user or to invalidate an session. Is there any api or steps to follow to achieve this? Thanks.

---

<div class="post-metadata">

**Author:** ![SK-UC](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sk-uc/32/200411_2.png) [@SK-UC](https://community.hubspot.com/u/SK-UC)\
**Post date:** [October 25, 2023, 11:32am UTC](https://community.hubspot.com/t/logout-users/83983/2 "2023-10-25T11:32:41Z")

</div>

To help anyone in the future…

To log a user out of Auth0 and Hubspot you need to direct the user (via link - e.g. a button) to one of the two Auth0 logout methods (OIDC or Auth0) while supplying a redirectTo back to the Hubspot logout page. You must specify the hubspot logout page in your Allowed Logout URLs in the Auth0 application.

https://**[YOUR-AUTH0-DOMAIN]**/v2/logout?client\_id=**[THE-CLIENT-ID-FOR-THE-INTEGRATION]**&returnTo=https%3A%2F%2F\*\*[YOUR-HUBSPOT-DOMAIN]\*\*%2F\_hcms%2Fmem%2Flogout

To create a log in button for Hubspot (though just going to protected content will require login)…

https://**[YOUR-HUBSPOT-DOMAIN]**/\_hcms/mem/saml?redirect\_url=https%3A%2F%2F\*\*[YOUR-HUBSPOT-DOMAIN-AND-PATH]\*\*
