I think you should look at this post to see what you should be doing. I personally have never successfully connected an oauth2 user-agent flow in the api connector but instead use the method described in this post where when a user logs in they are directed to a discord auth page where they login and then get redirected back to your app with a key in the url and that key can be used for all your api calls. Check the post. Hope this helps.