Is it possible to return to an Auth0 Forms screen after SNS login (e.g., Google) and use the linked account?

Hi everyone,

I’m currently using the new Auth0 Forms to build a custom account settings screen.

What I want to achieve is the following flow:

  1. A user clicks a custom button in the Forms UI (created via Custom Field Component)
  2. The button triggers a redirect to an external SNS login page (e.g., Google via /authorize?connection=google-oauth2)
  3. The user completes SNS login
  4. After successful authentication, they are redirected back to the original Forms screen
  5. The SNS account info is then used to link or log in to the current session in the Forms flow

My question is:

:red_question_mark: Is it technically possible to return to the same Auth0 Forms UI (in progress) after SNS login?
And use the linked SNS account as the login identity or attach it to the current user?

From what I understand so far, it seems that:

  • The SNS login flow starts a separate authentication transaction
  • Once the user leaves the Flow via redirect, the original Forms session is terminated
  • Forms (api.prompt.render) can only be called once per login session

If that’s the case, are there any workarounds?
Or is the only solution to handle SNS login separately, then redirect back to our application and manage account linking outside of Forms?

Thanks in advance for your help!

Hi There!

Welcome to the Auth0 Community!

Thank you for posting your question.

:red_question_mark: Is it technically possible to return to the same Auth0 Forms UI (in progress) after SNS login?
And use the linked SNS account as the login identity or attach it to the current user?

Unfortunately, it’s not possible to return the same Form as the Form was built to substitute, to use the redirect from the Action perspective. Forms can be called once per Action, so technically you can have a 2nd action that will trigger the 2nd separate form. If you see the room for improvement here, I would encourage you to open a new thread in the Product Feedback category explaining your use case and proposed solution. Make sure to vote on it!

Thanks
Dawid