LINE social login not working

I understand not many people uses LINE. But, in Taiwan, almost 100% of the population uses it. Therefore, LINE social login would be useful.

Currently, I cannot get the LINE social login to work (Google, Facebook, Apple login all works) on mobile. I can get LINE desktop login to work. But, when I am on mobile, I get the error page “Oops!, something went wrong… You may have pressed the back button, refreshed during login, opened too many login dialogs…”

Again, I only get this error message using LINE. Google, Facebook, and Apple all works fine.

I might have to add, my app is in standalone mode. It is a PWA. I tried both “popup” and “redirect” for uxMode. Both don’t work.

Wondering if anybody else is experiencing the same issues.

Hi Brian,

Thanks for reaching out and providing the details about the issue you’re facing with LINE social login on mobile. I understand how crucial LINE is in Taiwan, and I’m here to help!

Just to confirm the setup:

  • It seems like you’re using a Web3Auth setup integrated into a PWA in standalone mode.
  • You’ve tried both “popup” and “redirect” uxModes, but the LINE login specifically isn’t working on mobile.

Could you provide a few additional details to help our support team troubleshoot this further?

  • Web3Auth Initialization & Login Code Snippets: This will help us understand how LINE login is being configured.
  • Are there any specific environment configurations or LINE SDK versions being used?
  • If possible, capture any browser console errors or details when you attempt the login on mobile.

The error message suggests there might be an issue with how the login state is handled on mobile, particularly in standalone PWAs. As a quick workaround, ensure that your app has the correct return URLs configured for mobile.

Feel free to share any more information, and we’ll work together to get this resolved!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

I am using Wagmi, so I have followed the wagmi-connector docs to create the wagmi “config”, as follows:

// create privateKeyProvider
const chains = [polygon];
const chainConfig = {
  chainNamespace: CHAIN_NAMESPACES.EIP155,
  chainId: "0x" + chains[0].id.toString(16),
  rpcTarget: chains[0].rpcUrls.default.http[0],
  displayName: chains[0].name,
  tickerName: chains[0].nativeCurrency?.name,
  ticker: chains[0].nativeCurrency?.symbol,
  blockExplorerUrl: chains[0].blockExplorers?.default.url,
  logo: "https://cryptologos.cc/logos/polygon-matic-logo.png",
};
const privateKeyProvider = new EthereumPrivateKeyProvider({ config: { chainConfig } });

// creaet web3AuthInstance
const web3AuthInstance: Web3AuthNoModal = new Web3AuthNoModal({
  clientId: process.env.NEXT_PUBLIC_WEB3AUTH_ID!,
  web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
  privateKeyProvider: privateKeyProvider,
});

// configure adapter, as 2FA prompt appears every now and then, which is undesired
const authAdapter = new AuthAdapter({
  loginSettings: {
    mfaLevel: "none",
  },
  privateKeyProvider: privateKeyProvider,
});
web3AuthInstance.configureAdapter(authAdapter);

const config: Config = createConfig({
  // wagmi default set up has ssr:true and storage: createStorage({storage:cookieStorage}), where cookieStorage is imported from wagmi (related to initialState?)
  chains: [polygon],
  transports: {
    [polygon.id]: http(),
  },
  connectors: [
    Web3AuthConnector({
      web3AuthInstance: web3AuthInstance,
      loginParams: { loginProvider: "google" },
    }),
    Web3AuthConnector({
      web3AuthInstance: web3AuthInstance,
      loginParams: { loginProvider: "facebook" },
    }),
    Web3AuthConnector({
      web3AuthInstance: web3AuthInstance,
      loginParams: { loginProvider: "apple" },
    }),
  ],
});

To add LINE, I just added another connector instance using “line”

Hey @jonwayhuang

We were recently facing issues with LINE which were resolved last week. Let me know if you are still facing this issue.