replaceUrlOnRedirect flag is not working when set to false

When asking for help in this category, please make sure to provide the following details:

  • SDK Version: 7.1.2
  • Platform: Web application - React.js
  • Browser Console Screenshots: No error returned in browser console.
  • If the issue is related to Custom Authentication, please include the following information (optional):
    • Verifier Name:
    • JWKS Endpoint:
    • Sample idToken (JWT):

Also, kindly provide the Web3Auth initialization and login code snippet below. This will help us better understand your issue and provide you with the necessary assistance.

const currentChainConfig = {
    chainNamespace: CHAIN_NAMESPACES.EIP155,
    rpcTarget: 'https://polygon-rpc.com',
    blockExplorer: 'https://polygonscan.com/',
    chainId: '0x89',
    displayName: 'Polygon Mainnet',
    ticker: 'matic',
    tickerName: 'Matic',
}

const web3AuthNetwork = {
  displayName: 'Mainnet'
}

const web3AuthInstance = new Web3AuthNoModal({
  clientId: clientId,
  chainConfig: currentChainConfig,
  web3AuthNetwork: web3AuthNetwork,
});

const privateKeyProvider = new EthereumPrivateKeyProvider({
  config: { chainConfig: currentChainConfig },
});
const openLoginAdapter = new OpenloginAdapter({
  privateKeyProvider,
  adapterSettings: { uxMode: "redirect", replaceUrlOnRedirect: false },
});

web3AuthInstance.configureAdapter(openLoginAdapter);
await web3AuthInstance.init()

const loginWeb3 = async (loginProvider: string) => {
  if (!web3Auth) {
    console.log("web3auth not initialized yet");
    return;
  }
  const localProvider = await web3Auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
    loginProvider: loginProvider,
  });
  setWalletProvider(localProvider!);
};

When using uxMode: redirect and replaceUrlOnRedirect: false, whenever the login succeeds and web3auth returns to our application’s domain, parameters from the original URL are stripped anyways.

@manuel.cattelan Welcome Aboard!

Are you using the latest version of Openlogin Adapter as well ?

Hi @vjgee, yes I’m using the lastest version of the openlogin adapter aswell.

Thanks for confirming.

Your issue has been forwarded to our Dev team and we will get back with further updates.

We’re not able to reproduce this. Can you provide a minimal reproducible example or your app link so that we can test this?