UNPKG

@locii/biopass-cognito-sdk

Version:

Biopass Cognito Web SDK

24 lines 705 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SessionStorage = void 0; const BIOPASS_SESSION_KEY = 'Biopass.Session'; class SessionStorage { getSession() { const data = localStorage.getItem(BIOPASS_SESSION_KEY); if (!data) { return undefined; } return JSON.parse(data); } setSession(data) { console.log('setSession sdk'); if (data) { localStorage.setItem(BIOPASS_SESSION_KEY, JSON.stringify(data)); } } clearSession() { localStorage.removeItem(BIOPASS_SESSION_KEY); } } exports.SessionStorage = SessionStorage; //# sourceMappingURL=biopass-session.js.map