# What is the correct way to logout after OAuth?

**URL:** <https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268>\
**Category:** API and Webhooks\
**Created:** [April 28, 2022, 1:13pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268 "2022-04-28T13:13:47Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [April 28, 2022, 1:13pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/1 "2022-04-28T13:13:47Z")

</div>

I have integrated Zoom OAuth in the MacOS app (with Zoom Meeting SDK).

Where the app is redirected the user to the browser and the browser is redirected the user back to the application if the auth is success.

But I have a question about logout: what is the correct way to logout?

There are two endpoints:

1. POST: [https://zoom.us/oauth/revoke](https://zoom.us/oauth/revoke)  
_Account in browser is still active after this request. And user isn’t showed Zoom’s OAuth ways page (Google, FB, etc), just signing in automatically._
2. DELETE: [https://api.zoom.us/v2/users/{userId}/token](https://api.zoom.us/v2/users/%7BuserId%7D/token)  
_User is showed Zoom’s OAuth ways page (Google, FB, etc) even after reauth ( **and that’s what I want** ), BUT this request initiate logout from ALL clients where I was logged in._

Maybe there is one more way to logout?

_ **PS:** First I asked [the question](https://devforum.zoom.us/t/correct-way-to-logout-after-success-oauth/68184) for #meeting-sdk category. But I was advised to reask it here._

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [May 5, 2022, 2:31pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/2 "2022-05-05T14:31:15Z")

</div>

**Problem**  
the main problem for me for now that after `https://zoom.us/oauth/revoke` endpoint using if I want to sign in again - browser make a “auto login”, I mean browser redirects me to the app without Zoom’s OAuth ways page (Google, FB, etc) and without the page where I can select an account.

**Question**  
How can I reach the behavior when after revoke request I won’t have “auto login” with the last logged user in my browser?

> macOS Monterey Version 12.1  
> Safari Version 15.2 (17612.3.6.1.6)

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [May 17, 2022, 10:28am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/3 "2022-05-17T10:28:03Z")

</div>

Hi, is any updates about Zoom logout method?

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [June 2, 2022, 9:17am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/4 "2022-06-02T09:17:29Z")

</div>

Hi, is there any updates about this question?

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [June 4, 2022, 1:59am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/5 "2022-06-04T01:59:12Z")

</div>

@anton.yereshchenko,

> [@anton.yereshchenko](#):
>
> How can I reach the behavior when after revoke request I won’t have “auto login” with the last logged user in my browser?

After you revoke an OAuth token, everything restarts from scratch. The user will have to sign in again.

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [June 17, 2022, 7:13am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/6 "2022-06-17T07:13:47Z")

</div>

@donte.zoom Hi, thank you for the answer!  
Could you please confirm that `revoke` api method should logout the current user from the browser too?  
and after revoking it should not be an auto login effect?

For example I mean the user who have used gmail to enter.

thank you!

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [June 17, 2022, 9:37am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/7 "2022-06-17T09:37:09Z")

</div>

Correct, @anton.yereshchenko!  
It should not be an auto-login effect after revoking; the user will have to authenticate your app to use it again. You can test this edge case by adding a user, then revoking their access token.

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [June 30, 2022, 5:35pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/8 "2022-06-30T17:35:57Z")

</div>

@donte.zoom , Hi, thank you for confirmation!

[USING Revoking: [https://zoom.us/oauth/revoke](https://zoom.us/oauth/revoke)]  
by an auto-login effect I mean the behaviour, when the browser doesn’t give ability to select a new account (or way to login) and redirects to the application using the last known account ([attached demo video](https://drive.google.com/file/d/18kX_nj5tG01H1fGEKnHBm3WA9mfV79tz/view?usp=sharing)).

sign in - zoom oauth procedure  
sign out - revoking an access token

should I remove cookies? or something like this to open Sign in page after revoking?  
Sign in page:

 ![Screenshot 2022-06-30 at 20.34.46](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/e/fe823ea0bf47e6d7fa3544708bc307f4962f142f.jpeg)

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [June 30, 2022, 6:24pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/9 "2022-06-30T18:24:22Z")

</div>

Hi @anton.yereshchenko, yes please try clearing browser cookies as it is likely having the user credentials persist. Can you please report back and let us know if this works?

Gianni

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [June 30, 2022, 6:29pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/10 "2022-06-30T18:29:16Z")

</div>

@anton.yereshchenko,

When you say should you remove cookies to open Sign in page after hitting the revoke endpoint. Are you saying that after removing cookies, you are not able to open the Sign in page ? Please see this post for more details on the expected results of hitting the revoke endpoint :

> [@Zoom API : How to revoke App Access when user wants to disconnect your app and Zoom app](https://devforum.zoom.us/t/zoom-api-how-to-revoke-app-access-when-user-wants-to-disconnect-your-app-and-zoom-app/18432/3):
>
> Hey @jitenshah, We don’t have an endpoint to uninstall an app, but you can direct users to [https://marketplace.zoom.us/user/installed](https://marketplace.zoom.us/user/installed) so they can uninstall it. If you need to revoke a users access tokens due to a security breach or other reason, you can use the [revoke access token endpoint.](https://marketplace.zoom.us/docs/guides/auth/oauth#revoking) Thanks, Tommy

# Revoking-an-access-token

[https://marketplace.zoom.us/docs/guides/auth/oauth/#revoking-an-access-token](https://marketplace.zoom.us/docs/guides/auth/oauth/#revoking-an-access-token)

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [July 1, 2022, 9:17am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/11 "2022-07-01T09:17:34Z")

</div>

@donte.zoom,

So as I understand we should use access token revoking when we want to remove the app from “ **Added Apps** ”, shouldn’t we?  
Maybee revoking isn’t what I’m looking for.  
I need the endpoint to logout from current session (not from all, if it posible)  
Just to sign out from the current account, with ability to select another account or login way.  
Is it supported for now?

---

<div class="post-metadata">

**Author:** ![anton.yereshchenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anton.yereshchenko/32/16916_2.png) [@anton.yereshchenko](https://devforum.zoom.us/u/anton.yereshchenko)\
**Post date:** [July 1, 2022, 9:21am UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/12 "2022-07-01T09:21:04Z")

</div>

@gianni.zoom , thank you  
I need to check it 👌

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 31, 2022, 7:21pm UTC](https://devforum.zoom.us/t/what-is-the-correct-way-to-logout-after-oauth/68268/13 "2022-07-31T19:21:41Z")

</div>

Closed on July 31, 2022, 7:21pm UTC

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