Hi im trying to do Authorization code flow, where i want the user to log-in to page to read his data (in what guild he is and so on). The issue im currently having is that i followed the guildeline for OAuth from client side but unfortunatelly the api when redirected is returning: 400 Invalid grant type or callback URL is not valid..
Here is a snippet of my code where im redirecting:
const base = "https://oauth.battle.net/authorize?";
const authUrl = new URLSearchParams({
region: 'eu',
client_id: 'my_super_secret_code',
response_type: 'code',
grant_type: 'authorization_code',
redirect_uri: 'http://localhost:5173/',
state: 'TEST',
scope: 'openid wow.profile'
}).toString();
Have i missed anything? I have read teh docs but there is nothing more specified to this please help.