Verify Email redirection

Hi,

I am building an Invite only role-based application(ie https://auth0.com/docs/authorization/concepts/rbac),
we need to send verification email to different type of user roles, after redirection each user need to redirect to different pages,
say
managers should redirect to ‘https://mysite.com/login’,
agents should redirect to ‘https://mysite.com/downloadapp’ etc. But in auth0 ‘Redirect To’ have only single redirection URL configuration. I tried storing user role in user meta and pass in redirect URL. But auth0 only allowing passing application details in redirect URL(ie {{ application.name }}). I also tried post email verification https://auth0.com/docs/api/management/v2#!/Tickets/post_email_verification but i don’t know
how to send this in the verification email.

Your help is much appreciated.
Thank you.

1 Like

There is some customization you can do on the redirect URL for e-mail verification, but I don’t think it can be done for user roles.

You could try a multi tenant approach, one tenant per user role, but that sounds ugly.

The other alternative is to take over verification yourself, using the mgmt API to handle it.

This doesn’t sound like a usual use case. Are you sure it should be done this way?

John

1 Like

Yes, our project is a Food delivery system invite-only application. Different type of users are there say admin, managers, vendors, crew, delivery agents etc. After verification crew/delivery agent should redirect to mobile application download page and all other users should go to login page.

If I get the userRole in redirect url i can handle the redirection in my front end code. I searched a lot, but couldnt find any auth0 way of handling the scenario.

can you suggest any alternative for the same?