Welcome to the Kinde community.

A
A
A
M
T
Members
GonzaP
G
GonzaP
Offline, last seen 3 weeks ago
Joined September 23, 2024
I'm trying to set up authentication in an expressjs api, and have followed the docs from kinde. When i go to localhost:3001/login or /register i can succesfully login but then i get redirected to KINDE_SITE_URL, and not to KINDE_REDIRECT_URL. The endpoint for KINDE_REDIRECT_URL is /api/usuarios/obtenerToken where i just receive the user and session objects to show the access token in screen and then use it in further requests. The problem is that even when even i just type localhost:3001/api/usuarios/obtenerToken i get redirected automatically to my KINDE_SITE_URL. I dont know why that happens or if i set up something wrong. Am using kinde-node-express 1.6.0. So in short, the main problem is that no matter how i GET api/usuarios/obtenerToken (REDIRECT_URL), i get redirected to /api-docs (SITE_URL), even if manually doing the request, and not after a login/register
1 comment
D
Hi, it's me again. In my app there will be two roles (probably not so much permissions for now) which i need to distinguish when authorizing endpoints of my API, and they'll have different mobile applications. I know I can manually edit roles of users from the Kinde page or set a role as automatically asigned to new sign ups. But is there a way to set a role to a user depending from which app they're signing up? Or another way a bit more programmatic and with logic and not just automatic for all?
4 comments
O
G