Hi Bohdan — thanks for the clear reproduction steps and screenshots. I’m sorry you’re hitting this hang — I’ll help get the support team the critical info and suggest a few likely fixes.
Summary of what I pulled from your report
- Issue type: Reporting an authentication flow issue (Web3Auth modal — Email Passwordless).
- Platform / environment: React + Vite app, Chrome 141 on macOS 15.6.
- Node: v23.7.0 (dev server)
- Flow: Web3Auth modal only (no redirect), OTP delivered and accepted, modal then shows “Verify your Email to continue” indefinitely.
- Origins: whitelisted in Web3Auth dashboard.
- You already tried: Incognito and clearing storage/cookies.
- Suspected cause (your note): missing Vite node polyfills (process.nextTick, stream, events).
Missing/unclear items that will help the support team (please provide if possible)
- SDK version(s) you’re using (Web3Auth modal SDK version + any other related libs).
- Code initialization & login snippets (the exact Web3Auth modal init/config and how you call the login). Don’t worry about pasting full app code — just the Web3Auth init and the call that opens the modal.
- Browser console logs and Network tab (HAR) around the time you enter the OTP. The UI hangs silently so console/network often show the underlying error. You attached images of the modal — thank you — but a console screenshot or exported HAR will be very helpful.
Why this commonly happens (quick diagnosis)
- Web3Auth code (and many web3 libs) may rely on Node built-ins or globals (process, Buffer, stream, events). Vite’s dev/build can omit those polyfills by default, which can cause libraries to fail silently or hang during promise resolution. Because the OTP is accepted but the auth never resolves, a client-side runtime error or missing polyfill is a likely cause.
Proposed quick troubleshooting steps (most likely to help)
- Check browser console and network for errors (CORS, 4xx/5xx, or missing global/builtin errors). If you see errors mentioning “process is not defined”, “stream”, or similar, that points to polyfills.
- Add Node polyfills for Vite. Two common approaches:
- rollup-plugin-polyfill-node (works with Vite build):
- npm i -D rollup-plugin-polyfill-node
- in vite.config.ts, add the plugin to build.rollupOptions.plugins. Also ensure global is mapped to globalThis:
import rollupNodePolyFill from ‘rollup-plugin-polyfill-node’
export default defineConfig({
plugins: [react()],
define: { global: ‘globalThis’ },
build: { rollupOptions: { plugins: [rollupNodePolyFill()] } }
})
- vite-plugin-node-polyfills (alternative): install and add to Vite plugins — this polyfills process, stream, Buffer, events, etc.
- rollup-plugin-polyfill-node (works with Vite build):
- Add small runtime defines if you see a specific missing global: in vite.config.ts add define: { global: ‘globalThis’, ‘process.env’: ‘{}’ } or set globalThis.process = { env: {} } early in your app (temporary test) to see if flow completes.
- Reproduce with console open — watch for any thrown errors while the modal is stuck. If the client is getting a 200 for OTP confirm but then a JS error prevents resolution, that console stack will point at the missing polyfill or failing module.
If those steps don’t help, please share the (only-if-possible):
- Web3Auth modal SDK version number.
- The Web3Auth init snippet and the call that opens the modal (copy-paste).
- A screenshot of the browser console and the failing network request (or a HAR).
Helpful links
- MetaMask dev docs: https://docs.metamask.io
- Web3Auth docs (for modal config / troubleshooting): Introduction | Documentation | Web3Auth
If you want, paste the Web3Auth init/login snippet here and I can point exactly where polyfills or config should be added. I’ll stay on this thread and help triage once you provide the tiny missing bits — thanks for the clear reproduction steps, that helps a lot.
Note: This response was generated by an AI bot and may require further verification. The MetaMask Community Team has tracked this issue and will be responding as soon as possible.
Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. MetaMask Developer Office Hours