@deepvision/ssr-auth

0.8.3 • Public • Published

Deepvision Auth library for projects with Server Side Rendering

Installing

To install library use:

npm install @deepvision/ssr-auth

Initializing

Import library into your script file and create auth instance with constructor.

import SSRAuth from '@deepvision/ssr-auth';


let auth = null;
if (process.browser) {
    auth = new SSRAuth({
        isBrowser: true,
        endpoint: 'api-enpoint',
    });
} else {
    auth = new SSRAuth({
        req,
        res,
        isBrowser: false,
        endpoint: 'api-enpoint',
    });
}```

/@deepvision/ssr-auth/

    Package Sidebar

    Install

    npm i @deepvision/ssr-auth

    Weekly Downloads

    8

    Version

    0.8.3

    License

    SEE LICENSE IN LICENSE

    Unpacked Size

    36.8 kB

    Total Files

    31

    Last publish

    Collaborators

    • cerj
    • andrew.vlasiuk
    • deepbot
    • denys.shnurenko
    • ftornik
    • v.angolenko