1.1.2 • Published 2 years ago
reauth-express v1.1.2
express-reauth
This is build on top of the ReAuthAPI for ReAuth by RedCrafter07
usage:
app.get("/login", async (req, res) => {
try {
let user = await getUser("<your-token>", "<your-id>", req, res);
}
catch {
return res.send("Unauthorized");
}
if(!user) return;
//process
res.send("Authorized");
});
re-auth-api:
reauthExpress.api;
new Functions:
getSettings(token);
getSetting(token, JSONPath);
deleteSetting(token(, JSONPath));
setSetting(token(, JSONPath));
getCSRFToken(token);
deleteCSRFToken(CSRFToken);
getInfos(applicationID);
please note, that you need to set /login to the redirect url of your application
npm i reauth-express