Disconnect social network

Is it possible to disconnect a social network account from a bubble account that has an email address? I am using oauth2 User-agent flow, do I need to use self-handled for this? @neerja

Does anyone else know the correct way to dissconnect an oauth account from bubble account?

Normally, go in the social network you are logged in and remove auhtorization to bubble

Ok so that’s normal protocol, I guess I could have a disconnect button that opens a new tab to the api website. https://dribbble.com/account/applications where the user can remove the authentication.

To totally remove it yes. You can always just disconnect in Bubble using log out but to really remove the authorization, user need to revoke it in application.
Some API will offer a revoke/delete way to

2 Likes

Hi @Jici - What is the best way to understand when the user revokes access from the social media site? I am using Discord 0auth.

Example:

  1. User authenticates successfully with Discord on my Bubble app (I am using a user-agent flow)
  2. User goes to Discord, and revokes access
  3. When user returns to my Bubble application, I don’t know that access was revoked until I try to make a call to Discord API and have an error returned… I have to use regex to sort through the response body. It feels like a hack.

Is there an easier way to anticipate or handle this situation?

I think there must be something like

POST https://discord.com/api/oauth2/token/revoke
Content-Type: application/x-www-form-urlencoded
data:
  client_id: <client_id>
  client_secret: <client_secret>
  token: <access_token>

@daviddr17 I understand how to voluntarily revoke the token from my end… but the user is also able to log into Discord and revoke the token from the Discord side. When this happens, my Bubble app doesn’t know and then the next time I try to access a user’s token, it throws an error.

What I’d like to do is somehow catch that error, and reset their Discord token within Bubble if/when that’s the case. Any thoughts?