Twitch login/signup for android

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.