Electron Application authenticate login redirect loop

As the title suggests,

I have an electron application that I am developing, and I want to access WoW’s game profile API so the end user can view their characters within the application. What I have is a simple link on the home page that looks like this…

https://oauth.battle.net/authorize?region=US&response_type=code&client_id=MY_CLIENT_ID&redirect_uri=MY_REDIRECT_URI&state=oauth&scope=wow.profile

I can click the link and I’m taken to the Bnet login page and from there I can enter my email/password and the authenticator screen pops up and about 1-2 seconds later way before I get a chance to approve the login request the page just refreshes and as a result I cannot hope to login.

I’ve seen that others have had issues with this but considering this is an Electron application I’m unsure how to go about “just clear your cookies” outside of leveraging Electron’s session object and invoking clearStorageData on app ready. Just for the heck of it I’ve also tried just using the env in a browser window itself rather than Electron and I get a 400 error

The state parameter must be provided

I’m really confused where my mistake is in the url I made? I did provide a state param.