Email-confirmation URL should be configurable
Version: 1.1.39
Describe the bug
The email confirmation (verification) URL is not configurable from the environment variable. when the user tries to verify(confirm) the email It directs to authorizer built-in page, it's ok to redirect to the default authorizer page, but it should be configurable because we need to do our business logic and redirect the URL (email-verification URL) to our page. It should be flexible as per user needs.
Currently, the email verification URL takes AUTHORIZER_URL env value if it is provided, but we use AUTHORIZER_URL for third-party authentication by this reason we can't change the URL to use in email verification to redirect verification to our site.
Steps To Reproduce
- signup
- try to verify user email - email confirmation(verification)
Expected behavior
Authorizer URL that we used for third-party authentication should be configurable differently from the URL we use for email verification, forgot-password, etc. those authentication URLs like email-verification and forgot-password should be configurable from the environment variable.
- OS: ubuntu
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Additional context
@minilikmila There are 2 ways to configure this
-
[Recommended way] Using
redirect_url/redirect_uriparams available for signup / magic_link/forgot_password mutations in API - Using
APP_URLenv variable.
Can you please try with above 2 approaches and let me know if that does not work.
@lakhansamani I tried both ways, they are working well, and the issue resolved, but in email-verificatioin and magic-link, when user clicked the link at the first time it worked as intended and redirected to the given redirect_uri. but if clicked the 2nd time it redirected to the default AUTHORIZER_URI. When click the link for the 2nd time , it not use a given redirect_uri.
True, we need to redirect in case of failure of as well Seems duplicate of following https://github.com/authorizerdev/authorizer/issues/321
Thank you for sharing this. I will fix this in upcoming releases.
@lakhansamani Okay, appreciated, Thank you for your kind and immediate response.