0

First time attempting to use oauth with python django and django-allauth. I can't seem to make logins happen. I can get to the point where you are asked to authorize your site with battlenet, but when you're redirected to the callback url I just get this:

{'code': 'unknown', 'provider': 'battlenet', 'exception': ProxyError(MaxRetryError("HTTPSConnectionPool(host='us.battle.net', port=443): Max retries exceeded with url: /oauth/token (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))",),)}

I have created my application in dev.battle.net, I've put the client key and the secret key in my django-allauth app, but I get stuck at this point.

Anyone have any experience with this?

Jason
  • 72
  • 7

2 Answers2

1

I managed to answer my own question.

I'm using pythonanywhere to host this for now and I was using the free service. Seems there's a white list of urls that you can hit if you're a free user and us.battle.net was not on the list. I registered for a month and after a few minutes my oauth calls work fine.

If anyone else happens to be in my situation, here's the list of sites that pythonanywhere can hit for free accounts.

https://www.pythonanywhere.com/whitelist/

Jason
  • 72
  • 7
0

What kind of proxy are you running? Nginx + Gunicorn? It's trying to hit '/oauth/token' and failing on that. I've just set up a allauth with Battle.net but I didn't see this along the way.

What does your urls.py and settings.py look like?

  • You need to have SITE_ID specified in your settings file.
  • Ensure your reverse proxy is handling https requests.
Kohonski
  • 1
  • 1