COACH
KKinde
•Created by COACH on 12/28/2024 in #💻┃support
ExpressJS SDK working locally, but not hosted, need help with logging
No problem, thanks!
7 replies
KKinde
•Created by COACH on 12/28/2024 in #💻┃support
ExpressJS SDK working locally, but not hosted, need help with logging
Thanks for your response, I have reduced the app to the bare minimum detailed below, but this is still not working remotely, and I can confirm all URLs are correct.
When running locally everything works with local URLs, but remotely (with remote URLs) I am being redirected to my "unAuthorisedUrl". So I assume this is a fallback URL from kinde.
How can add logging to understand where this is failing?
const kindeClient = setupKinde(kindeConfig, app);
app.get("/", async (req, res) => {
if (await kindeClient.isAuthenticated(req)) {
res.redirect("/admin");
} else {
res.send("No <a href=\"/login\">login</a>");
}
});
app.get("/admin", protectRoute, getUser, (req, res) => {
res.send("Yes <a href=\"/logout\">logout</a>");
});
7 replies
KKinde
•Created by COACH on 11/24/2024 in #💻┃support
expressjs and protected routes with user roles
Thanks! Will have a play with all this tomorrow.
3 replies
KKinde
•Created by tga on 11/25/2024 in #💻┃support
Something went wrong - Error code: 1656
I am having the same issue with expressjs on vercel. Same message and looking at logs on vercel i see a 302
5 replies