1.1.2 • Published 2 years ago

reauth-express v1.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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

NPM Package

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago