[Solved] Prevent twitch authorization from auto forwarding

I have gotten the twitch Oauth working for logging in, authorization etc., but I am wondering how I would allow for a user to authenticate a second account without having to log out of the original if it is possible at all.

Right now, whenever I click my login button, twitch automatically redirects without giving the option to switch accounts. Is there a way to force twitch to give the option to change accounts?

Basically I want a user to be able to add their own bot account if they want.

As documented

Optional Parameter Type Description
force_verify boolean Specifies whether the user should be re-prompted for authorization. If this is true, the user always is prompted to confirm authorization. This is useful to allow your users to switch Twitch accounts, since there is no way to log users out of the API. Default: false (a given user sees the authorization page for a given set of scopes only the first time through the sequence).
1 Like

Thank you. I am using a library for OAuth, so I completely overlooked it as I only browsed that section of docs.

Having never used a boolean in a url paramater, I just want to sanity check that the following should do.

GET 'https://id.twitch.tv/oauth2/authorize?force_verify=true&response_type=token&client_id=uo6dggojyb8d6soh92zknwmi5ej1q2&redirect_uri=http://localhost&scope=viewing_activity_read&state=c3ab8aa609ea11e793ae92361f002671'

Yes should literally be the word true

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