Open jleclanche opened 7 years ago
I guess that, if we make an explicitly separate battlenet_cn
socialaccount provider, then all I would need is a way to override whatever mechanism gets the matching socialapp from battlenet
instead of requiring creation of a separate battlenet_cn
socialapp. But how?
OH! i totally forgot. You need a discord server for questions / comments / discussions like this.
It's your call but I found on my projects it cut down on a LOT of issue submissions in my github of people looking for general support that end up here. If you dont mind general support requests you should create a "discussion" or "support" tag.
@derek-adair See: https://github.com/pennersr/django-allauth/discussions
Oh! this is fantastic i wasn't aware of this.
Hey @pennersr, I need your thoughts on this.
Here's how the Battle.net API works:
us
,eu
,sea
,kr
,tw
), all of them have the same API layoutus.battle.net
foreu
accounts, and vice versa.cn
, which uses mostly the same API layout but a different base URL for API and Account API (this is correctly handled in allauth 0.28). The accounts in thecn
region are not shared across the other regions - it's a different database.id
(the UID) and, most of the time, a battletag (username). Theid
is guaranteed unique across regions, but I do not think it is unique across china and the other regionsMy plan right now is to publish a test instance of my site using the China-specific endpoints and observe what happens and how the API behaves. I want to do it as close to the way we'll end up implementing it upstream. This is where I need some help.
My current thinking: I have created a custom, china-specific provider and adapter, which subclass their respective BattleNet classes.
Now, despite using a (suspected) different account database, the OAuth database is synced across China and ROTW. That means the SocialApp API keys are the same across all regions. This means we can't straight up create a separate provider... right?
So considering all this... how would I do the following and actually be able to use it for the battlenet app?