Using Internet Identity Login Without Opening a New Tab

By default, when logging in with Internet Identity, it opens a new tab. Is it possible to keep users on the same page instead? For example:

  • Trigger login directly in the same page without opening a new tab

  • Or open Internet Identity in the same window and then return to the previous page

  • Or even use a popup/modal for the login flow

Has anyone implemented this, or is it currently supported?

Yeah, I had mine working similar to that by modifying the windowOpenerFeatures in the authClient login method, like so:

const login = useCallback(() => {
  authClient?.login({
    ...options.loginOptions,
    windowOpenerFeatures:
      `left=${(window.screen.width - 500) / 2}, ` +
      `top=${(window.screen.height - 600) / 2},` +
      `toolbar=0,location=0,menubar=0,width=500,height=600`,
    onSuccess: () => {
      updateClient(authClient);
    },
  });
}, [authClient, options.loginOptions, updateClient]);

Feel free to check out my login flow if it matches what you were describing:
https://eqflo-qyaaa-aaaan-qz56q-cai.icp0.io/