Github OAuth using NodeJs and Passport Js.

preview_player
Показать описание


code:

discord:
Рекомендации по теме
Комментарии
Автор

This is great!! Here is a shorter version of the "isAuth" middleware:

const isAuth = (req, res, next) =>
req.user ? next() : res.redirect("/login");

tpglitch
Автор

How would this work if we arent rendering with the backend? Every tutorial assumes that the rendering is handled by node. To clarify, I AM using node, but as an API, and not to render the HTML, redirect etc.

ilearncode