Skip to content

Client requirements

The backend sends email notifications to users. The notifications may contain links that lead to the frontend application.

The frontend app has to implement some logic to handle the links.

It's a common scenario when the backend sends an auth link to a user. You need to implement the auth by link. The example of url the backend sends to a user: https://frontend.app/auth/link/{token}.

You need to handle the /auth/link/{token} path on the frontend app side.

Query parameter next

Sometimes a user must be redirected to a specific path after successful action (e.g., authentication).

The backend adds a next={path} query param to the link. So the frontend app can identify where the user should be redirected.
The {path} value doesn't contain protocol or domain data. It's always the path only.

Example: https://frontend.app/auth/link/{token}?next=/references