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.
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