So i am using this guide https://overwolf.github.io/docs/topics/login-with-twitch to create lgoin with twich feature in my overwolf app. I have updated my overwolf client to latest version as well which is 0.168.0.12. I have an angular app which is being served on localhost on which twich redirects after login, which then redirects to overwolf app using window.location.replace(
overwolf-extension://fhpkpngibplfkdemdfmfpnngnbjackanpljjjlek/Files/index.html);
. When i run this angular app in chrome it successfully launches overwolf app. Now in my overwolf app i am redirecting user to twich where user logins with their twich credentials and is redirected to my angular app, upto this step everything is working just fine, but when angular app tried to redirect to overwolf app using window.location.replace(
overwolf-extension://fhpkpngibplfkdemdfmfpnngnbjackanpljjjlek/Files/index.html);
in overwolf browser application is crashing and i am not sure why this is happening. I am sharing related code snippets for better understanding.
This piece of code redirects user to twich login:
<div className="color-white">More Than Matchmaking</div>
<a href="https://id.twitch.tv/oauth2/authorize?client_id=<my-id>&redirect_uri=http://localhost:4200&response_type=token&scope=user:read:email" className="btn-play flex-class">
Login with Twitch
</a>
upon successful login redirects user to my angular app and in angular app this piece of code handles the redirection.
ngOnInit(): void {
var url = new URL(location.href);
var code = url.searchParams.get("code");
console.log('code', code)
window.location.replace(`overwolf-extension://fhpkpngibplfkdemdfmfpnngnbjackanpljjjlek/Login/login.html`);
}
Now i have checked console and code executed upton console.log line without any problem but on window.location.replace(overwolf-extension://fhpkpngibplfkdemdfmfpnngnbjackanpljjjlek/Login/login.html
);
}
application is crashing. And its happening only in overwolf browser, while its working as expected in chrome.