I want to build a dashboard using node and js views and use a template engine like Handlebars or Pug, can I use PassportJs Local in the Ajax call
P粉4634184832023-09-10 09:23:18
We use PassportJs as middleware on the server side to authenticate users.
However, on the client side, you call an endpoint such as /login
, which does not know if you are using PassportJs. So let's say we don't use PassportJs on the client side.
So you can definitely use Ajax to request an endpoint possibly on the server side using PassportJs.
Please check the documentation of PassportJs