bear documentation

how to use bear in your app

the docs are unfinished. tbh u can pretty much just use this code example but modify it for a database
            
app.get("/auth", (req, res) => {
    const redirectLocation = Buffer.from(`https://example.com/demo/handle`).toString(
    "base64",
    );
    res.redirect(`https://bear.dour.com/auth?redirect=${redirectLocation}&name=demo`);
});

app.get("/auth/handle", async (req, res) => {
    const { priv } = req.query;
    const { data } = await axios.get(`https://bear.dour.com/api/verifyToken?priv=${priv}`);
    if (data.error) {
    return res.json({ error: true, info: data.info });
    } else {
    // For this example, we're just responding with the user's username, although you should create the user in the database and generate a session token.
    return res.json({
        error: false,
        info: "it worked!",
        username: data.username,
    });
    }
});
            
        

(expressjs)