Custom API authentication

Hey guys I need some help here,
I'm currently developing a CRM using retool, I created a costume API for authentication using Prisma and nodeJS the endpoint returns a token that contains the user role and other information I want to redirect the user based on their role.
How can achieve this, and what are the steps to be able to perform the authentication process?

1 Like

hey @Aziz_Menzli can you provide more info about the API endpoint and its input+output values?

to clarify, you're asking how to use the returned API role assignment for the user to control what they see in a Retool app?

hey @trz-justin-dev the API I designed to accept an email and password as input and it returns a token that contains the userID, role, and email.
Based on the role in the token I will redirect the user to the appropriate application.

Hi @Aziz_Menzli,

You may need to run the auth steps as queries in your app instead of on the rest api resource authentication.

Currently, we have a feature request in our backlog for utilizing data received in the resource auth process inside an app.

1 Like