Self-hosting doesn't redirect to the original page after login success

I attached the image. When clicking the Google button, it shows google popup to authorize by google.
After google login success, it should disappear and redirect to the original login page. but it isn't closed and shows the login page there..
The code looks like this

const torusdirectsdk = new TorusSdk({
baseUrl: ${window.location.origin},
// user will be redirect to auth page after login
redirectPathName: ‘auth/login’,
enableLogging: true,
// uxMode: UX_MODE.REDIRECT,
network: ‘mainnet’
});
const EMAIL_PASSWORD = ‘email_password’;
const HOSTED_EMAIL_PASSWORDLESS = ‘hosted_email_passwordless’;
const AUTH_DOMAIN = process.env.NEXT_PUBLIC_AUTH0_DOMAIN; //dev-gin32n8q.us.auth0.com

const _loginToConnectionMap = (): Record<string, any> => {
	return {
		[EMAIL_PASSWORD]: { domain: AUTH_DOMAIN },
		[HOSTED_EMAIL_PASSWORDLESS]: {
			domain: AUTH_DOMAIN,
			verifierIdField: 'name',
			connection: '',
			isVerifierIdCaseSensitive: false
		}
	};
};

await torusdirectsdk.init({ skipSw: true });
if (!process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID) return;
const jwtParams = _loginToConnectionMap()[‘google’] || {};
const loginDetails = await torusdirectsdk?.triggerLogin({
typeOfLogin: ‘google’,
verifier: ‘web3aut-verifier’,
clientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
jwtParams
});

image



Originally posted by: polartar

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/494

Hey @talentdev2020 which particular SDK are you using? Torus Direct SDK is a bit outdated, you can utlise our Web3Auth Self Host intead: https://web3auth.io/docs/sdk/self-host/installation

Also if you want to use our CustomAuth SDK, here are the documentations around that: https://github.com/torusresearch/customauth



Originally posted by: yashovardhan