KindeK
Kinde16mo ago
6 replies
Ricer

ExpressJS SDK for a MEAN stack web application.

Hi,

I'm trying to integrate the SDK into my web application. My backend is written in ExpressJS and my frontend in AngularJS.
The authentication flow is as follows:
1) User presses a button to Sign in with Kinde.
2) The user is navigated to the backend via window.location.href = this.api.address + 'kinde/login'
3) A check is made to see if user is authenticated (via await kindeClient.isAuthenticated(req))
4) If not authenticated, the user is redirected to BACKEND_URL/login via res.redirect('/login')
5) The user then enters the credentials and is redirected back to BACKEND_URL/login

This is the case if I enter from BACKEND_URL/login manually, but when I start from the frontend, after entering my credentials in Kinde, I get redirected to the unAuthorisedUrl
Was this page helpful?