After Auth0 Signup user being asked to Login again

Hi everyone,

I’m struggling with a redirect loop issue using WeWeb + Auth0. I am trying to build a custom onboarding flow and could use some expert eyes on the “handshake” process.

The Workflow

  1. Custom Onboarding: The user fills out a WeWeb form (Email, Name, Company, Tier).

  2. The Redirect: On submit, I use a custom script to send them to Auth0.

  3. The Goal: I am using screen_hint=signup and login_hint=USER_EMAIL in the URL.

    • Expectation: User sets password –> Returns to app –> Automatically logged in.

    • Reality: User sets password –> Returns to app –> Bounced to Login page (Invalid Handshake).

The Technical Hurdle

It seems that by using a manual window.location.href to force the login_hint, I am breaking the WeWeb Auth Plugin’s internal listener. When the user returns with the code and state, the plugin doesn’t recognize the session and treats them as unauthenticated.

My Questions

  • Is there a way to use the built-in “Signup” action but pass a login_hint? I want the email value from my WeWeb variable to auto-populate the Auth0 signup field.

  • If I must use a custom script, how do I “prime” the WeWeb Auth Plugin? How can I make the plugin expect the user’s return so the handshake doesn’t fail?

  • Handshake Fix: Has anyone successfully used localStorage to manually set the a0.spajs.txs transaction key to match the incoming state?

What I’ve Tried

  • Direct browser redirects to the /authorize endpoint.

  • Manually constructing the state to match the transaction key.

  • Confirmed in Auth0 logs that the user is created successfully; the issue is strictly the “return flight” to WeWeb.

I want the user to only have to worry about their password. Any advice on keeping the Auth plugin “in the loop” while passing these custom parameters would be a lifesaver!

Hey @springbloom :waving_hand:

Mmm I think there might be a native way to do this with the plugin but haven’t used it in a while so not 100% sure. Let me check with the team and get back to you on this one.