If you are using Frontegg Hosted Login and followed one of the client-side frameworks guides here. You will be most likely using loginWithRedirect
function or hook that is redirecting the user either to the Hosted login or sign-up or to your application if there is already an existing session for the user in that browser.
In the process of redirect from your application URL to the Frontegg Hosted login or sign-up, the original URL is saved in the browser in order to redirect the user back, after the authentication with Frontegg.
In order to implement CTA buttons and similar functionalities using Frontegg's hosted login or sign-up, you will need to pass redirectUrl
as a query param on the link for Hosted login or sign-up, as in the below example:
https://[your-frontegg-subdomain]/oauth/account/sign-up?redirectUrl=[your-application-url-encoded]
https://[your-frontegg-subdomain]/oauth/account/sign-up?redirectUrl=http%3A%2F%2Flocalhost%3A3000
When passing the redirectUrl
- the user will be redirected back to this URL after the authentication. Not passing redirectUrl
will result in a user being stuck on /oauth
blank screen after the authentication.