Skip to main content

Redirect user

This article explains how to redirect a user to the ByUnico authentication experience via the REST API.

The userRedirectUrl field is used to direct the user. This field is received in the process creation success response.

There are two options for integrating with your web application:

1) Using window.open()

A opção window.open() consiste em abrir uma nova aba do navegador do usuário para que ele possa completar o processo. Ao final essa aba é fechada e redirecionada para sua aplicação.

Para isso é recomendado:

  • Seguir a documentação pública sobre isso, que se encontra aqui;

  • Monitorar se houve alteração de URL (para a redirectUrl) e então fechar a aba utilizando window.close();

2) Using redirect

We recommend following these steps:

  • In your common flow (which is inserted Registration by Unico) you will redirect the customer to the link generated through the API;
  • After this, the customer from within the platform carries out the necessary procedures to continue the flow;
  • When completed, they are redirected to your page (using the redirectUrl passed on when the process was created);
Important

The application does not work via iFrame for security reasons.

Any concerns?

Missing something or still need help? If you are already a customer or partner, you can contact us through the Help Center.