Im using the Twitch Authentication Node Sample from GitHub (access on 25.10.2020) and want to add the parameter “force_verify” so that the user doesn’t log in automatically. Is this possible and if how?
(I could embed the code here, but it’s on GitHub anyway)
That example uses the passport Twitch strategy.
A brief read of the passportJS docs it seems that it doesn’t support it.
As per my example(s)
You just add force_verify=true
to the URL you redirect the user to Twitch with
So
https://id.twitch.tv/oauth2/authorize?client_id=MyClientID&redirect_uri=MyRredict&response_type=code&scope=SCOPES
becomes
https://id.twitch.tv/oauth2/authorize?client_id=MyClientID&redirect_uri=MyRredict&response_type=code&force_verify=true&scope=SCOPES
It’s not beautiful nor recommandable (I think) but I found to way to easily do it with the sample. Simply add to the parameter authorizationURL “…?force_verify=true&” (https://id.twitch.tv/oauth2/authorize?force_verify=true&) and it worked for me. Thanks for your input, didn’t thought of this before.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.