I have an Angular app which uses a websocket connection to interact with a server. Now I need to implement OAuth in third party service, however I cannot handle any events on new tab opened via window.open(url).
The OAuth API redirects the window to my domain and returns token in URL query params. I need to catch this token to work with this. How can this be implemented?
const eHealthWind = window.open(msg.data.url);
console.log(eHealthWind.window);
eHealthWind.onload = function () {
eHealthWind.onpopstate = function (e) {
console.log('pop', e);
};
};