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.
Asked
Active
Viewed 1,067 times
2
-
So you basically want to check if a user is logged in rather? – Andrei Jan 10 '19 at 08:13
-
yes, if logged in than vote otherwise not. – tabyf5 Jan 10 '19 at 08:59
1 Answers
0
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

user2226755
- 12,494
- 5
- 50
- 73