You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I pass the popup properties to the function authorizeWithPopUp(), the left and top properties are overwritten in the metod getOptions() of PopUpService class.
Example taken from docs where you accept the properties but after you do the overwrite in the getOptions method:
loginWithPopup() {
const somePopupOptions = { width: 500, height: 500, left: 50, top: 50 };
I want to suggest that if you are passed the top and left properties then to use those properties and if they are not passed to uttilize the calculation that is done now.
The text was updated successfully, but these errors were encountered:
BlendiGashi
changed the title
[Refactoring]: improve the getOptions method in the PopUpService class
[Bug]: improve the getOptions method in the PopUpService class
Mar 23, 2023
BlendiGashi
changed the title
[Bug]: improve the getOptions method in the PopUpService class
[Refactoring]: improve the getOptions method in the PopUpService class
Mar 23, 2023
What Version of the library are you using?
[email protected]
When I pass the popup properties to the function authorizeWithPopUp(), the left and top properties are overwritten in the metod getOptions() of PopUpService class.
Example taken from docs where you accept the properties but after you do the overwrite in the getOptions method:
loginWithPopup() {
const somePopupOptions = { width: 500, height: 500, left: 50, top: 50 };
const authOptionsOrNull = /* ... */
this.oidcSecurityService.authorizeWithPopUp(authOptions, somePopupOptions)
.subscribe(({ isAuthenticated, userData, accessToken, errorMessage }) => {
/* ... */
});
}
Method taken from the class PopUpService:
getOptions(popupOptions) {
const popupDefaultOptions = { width: 500, height: 500, left: 50, top: 50 };
const options = { ...popupDefaultOptions, ...(popupOptions || {}) };
const left = this.windowInternal.screenLeft + (this.windowInternal.outerWidth - options.width) / 2;
const top = this.windowInternal.screenTop + (this.windowInternal.outerHeight - options.height) / 2;
options.left = left;
options.top = top;
return Object.entries(options)
.map(([key, value]) =>
${encodeURIComponent(key)}=${encodeURIComponent(value)}
).join(',');
}
I want to suggest that if you are passed the top and left properties then to use those properties and if they are not passed to uttilize the calculation that is done now.
The text was updated successfully, but these errors were encountered: