bian
04/04/2023, 1:07 PMrp_st
04/04/2023, 1:30 PMbian
04/04/2023, 1:33 PMbian
04/04/2023, 1:34 PMbian
04/04/2023, 1:34 PMbian
04/04/2023, 1:35 PMbian
04/04/2023, 1:35 PMrp_st
04/04/2023, 1:37 PMbian
04/04/2023, 1:44 PMhttps://cdn.discordapp.com/attachments/1092797645631791214/1092806900501971024/image.png▾
rp_st
04/04/2023, 1:44 PMbian
04/04/2023, 1:49 PMrp_st
04/04/2023, 1:54 PMprompt: "consent"
bian
04/04/2023, 2:02 PMbian
04/04/2023, 2:03 PMbian
04/04/2023, 2:03 PMrp_st
04/04/2023, 2:04 PMbian
04/04/2023, 2:08 PMbian
04/04/2023, 2:08 PMrp_st
04/04/2023, 2:10 PMbian
04/12/2023, 5:43 PMrp_st
04/12/2023, 5:47 PMbian
04/12/2023, 5:49 PMrp_st
04/12/2023, 5:59 PMsattvikc
04/13/2023, 5:50 AMbian
04/13/2023, 9:49 AMsattvikc
04/13/2023, 10:12 AMLogin with Google
, you need to call the function getAuthorisationURLWithQueryParamsAndSetState
on the thirdpartyemailpassword recipe. And that returns a url.
using that url, call the window.open function, more details on that here - https://www.w3schools.com/jsref/met_win_open.asp
now the entire flow happens on the pop up window. when the sign in / up flow completes, you need to call the window.close() function so that the pop up window can close after the flow completion.
on the main window, where you initiated the pop up, you need to handle the close event of the pop up window and reload or redirect as needed. this page has info on how to handle the pop up window close - https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascriptbian
04/14/2023, 4:29 AMsattvikc
04/17/2023, 1:26 PMbian
04/17/2023, 4:17 PMrp_st
04/17/2023, 4:17 PMbian
04/17/2023, 4:18 PMbian
04/17/2023, 4:19 PMrp_st
04/17/2023, 4:19 PMrp_st
04/17/2023, 4:20 PMbian
04/17/2023, 4:20 PMbian
04/17/2023, 4:21 PMbian
04/17/2023, 4:21 PMrp_st
04/17/2023, 4:21 PMrp_st
04/17/2023, 4:22 PMrp_st
04/17/2023, 4:22 PMbian
04/17/2023, 4:22 PMbian
04/17/2023, 4:23 PMbian
04/17/2023, 4:23 PMrp_st
04/17/2023, 4:24 PMbian
04/17/2023, 4:30 PMrp_st
04/17/2023, 4:38 PMbian
04/17/2023, 4:38 PMrp_st
04/17/2023, 4:39 PMrp_st
04/17/2023, 4:39 PMbian
04/17/2023, 4:41 PMbian
04/17/2023, 4:43 PM${origin}/auth
,
"_blank",
"width=600,height=600"
);
const url = await getAuthorisationURLWithQueryParamsAndSetState({
providerId: provider.id,
userContext,
authorisationURL: ${origin}/auth/callback/${provider.id}
,
});
if (providerPopup) providerPopup.location.href = url;bian
04/17/2023, 4:43 PMbian
04/17/2023, 4:43 PMrp_st
04/17/2023, 4:43 PMrp_st
04/17/2023, 4:44 PMbian
04/17/2023, 4:44 PMbian
04/17/2023, 4:46 PMrp_st
04/17/2023, 4:48 PMbian
04/17/2023, 4:48 PM