Replies: 2 comments
-
Checkout app.ts if (window.opener != null && (location.pathname == '/sign-in' || location.pathname == '/sign-up')) {
// The IExternalNavigationService is responsible for opening pages in a new window,
// such as during social sign-in flows. Once the external navigation is complete,
// and the user is redirected back to the newly opened window,
// the following code ensures that the original window is notified of where it should navigate next.
window.opener.postMessage({ key: 'PUBLISH_MESSAGE', message: 'NAVIGATE_TO', payload: window.location.href });
setTimeout(() => window.close(), 100);
} This handles not only sucessful sign-ins, it also handle failures. |
Beta Was this translation helpful? Give feedback.
0 replies
-
https://github.com/orgs/bitfoundation/discussions/10495#discussioncomment-12886592 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
Here is the relevant code that I focused on, so the pop up appears, I authenticate with say Google Successfully, the pop up closes and the main window is what gets the redirect.
public async Task NavigateToAsync(string url) { if (AppPlatform.IsBlazorHybrid) { navigationManager.NavigateTo(url, forceLoad: true, replace: true); return; } if (await window.Open(url, "_blank", new WindowFeatures() { Popup = true, Height = 768, Width = 1024 }) is false && await window.Open(url, "_blank", new WindowFeatures() { Popup = false }) is false) { navigationManager.NavigateTo(url, forceLoad: true, replace: true); } }
Looking at the typescript class, I am not finding any thing that will detect a successful auth and close the pop up but obviously there is communication happening somewhere
Beta Was this translation helpful? Give feedback.
All reactions