Reputation: 182
i' am working on a website in which I have to make a functionality for voting a specific channel so the requirement is that the user who is voting he must log in to vote a channel so how do i validate that this user is logged in or not because there is no Twitch API for logout. So as far as i have work on Twitch API i see this thing when i login via twitch in my website it logged you in on a Twitch site as well so as long as you are login in Twitch site you are also login in your site because of it takes a parameter of "redirect_uri" in login API as far as i assume. and if i create a session on user login and destroy it on my custom made log out it will always login in the my site because it is login in Twitch site.
Upvotes: 2
Views: 1234
Reputation: 13223
You have to revoke the token, like that :
POST https://id.twitch.tv/oauth2/revoke
?client_id=<your client ID>
&token=<your OAuth token>
https://dev.twitch.tv/docs/authentication/#revoking-access-tokens
Upvotes: 0