I am trying to implement twitch login/signup for my android app. I am following OAuth Implicit Code Flow. In the response I am getting html which I am displaying in a webview.
I am getting the error “ERROR for site owner: Invalid domain for site key” inside the captcha box. Please help out in fixing this.
Sounds like you are GETing and showing the Twitch Login page instead of redirecting the user to Twitch?
The following:
GET https://id.twitch.tv/oauth2/authorize
?client_id=<your client ID>
&redirect_uri=<your registered redirect URI>
&response_type=<type>
&scope=<space-separated list of scopes>
Should read:
REDIRECT THE USER TO https://id.twitch.tv/oauth2/authorize
?client_id=<your client ID>
&redirect_uri=<your registered redirect URI>
&response_type=<type>
&scope=<space-separated list of scopes>
If I just load the url in the webview how will I get the access token? As far as I understand is that when a user gives permission the user is redirected to a redirect url that we provide and in that redirect url we get the access token. So the webview just loads the redirect uri.
Yes I am being redirected to the url as expected. What I don’t understand is that if I don’t have my own server, how do I extract that access token and save it? I mean I am in a webview so I tried to solve this using deep linking but it is not opening the activity when redirected. Please help me out on this I am stuck here.