youtube_desktop icon indicating copy to clipboard operation
youtube_desktop copied to clipboard

Bug: OAuth redirect net::ERR_CONNECTION_REFUSED

Open adamellsworth opened this issue 6 years ago • 1 comments

To reproduce:

1.A Signup for an OAuth keypair 1.B. Register the following origin/callbacks in the control panel

  • Origin: http://localhost:5000
  • Redirect URI: http://localhost:5000/oauth2callback
  1. Sign up for an API key
  2. Enter keys into ./config/api_key.js following the format:
module.exports = {
  publicDataKey: 'your public data key',
  clientId: 'your client id',
  clientSecret: 'your client secret'
};
  1. Start the Electron app via npm start
  2. Click "signin" causing the OAuth popup
  3. open the Dev panel on that window and select "preserve logs"
  4. Sign In to Google and click "Allow" in the "Grant Access" view
  5. An error is thrown in the console (picture included):
localhost:5000/oauth2callback?code=<SECRET_STUFF>/m/auth/userinfo.profile%20https://www.googleapis.com/auth/userinfo.email:1 GET http://localhost:5000/oauth2callback?code=4/<SECRET_STUFF>auth/userinfo.profile%20https://www.googleapis.com/auth/userinfo.email net::ERR_CONNECTION_REFUSED
screen shot 2018-10-29 at 1 08 09 pm

adamellsworth avatar Oct 29 '18 20:10 adamellsworth

I'm not sure if this is related, but when I attempt to get the host from window.location.host in the console, it returns an empty string "". I'm not sure if there should be a secondary server being run or not to get this to work.

adamellsworth avatar Oct 29 '18 20:10 adamellsworth