@deepvision/ssr-auth
v0.8.3
Published
Deepvision SSR Auth Lib
Downloads
16
Keywords
Readme
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',
});
}```