How to use browser-tabs-lock - 1 common examples

To help you get started, we’ve selected a few browser-tabs-lock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github auth0 / auth0-spa-js / src / Auth0Client.ts View on Github external
runIframe,
  sha256,
  bufferToBase64UrlEncoded,
  oauthToken,
  openPopup
} from './utils';

import Cache from './cache';
import TransactionManager from './transaction-manager';
import { verify as verifyIdToken } from './jwt';
import { AuthenticationError } from './errors';
import * as ClientStorage from './storage';
import { DEFAULT_POPUP_CONFIG_OPTIONS } from './constants';
import version from './version';

const lock = new Lock();
const GET_TOKEN_SILENTLY_LOCK_KEY = 'auth0.lock.getTokenSilently';

/**
 * Auth0 SDK for Single Page Applications using [Authorization Code Grant Flow with PKCE](https://auth0.com/docs/api-auth/tutorials/authorization-code-grant-pkce).
 */
export default class Auth0Client {
  private cache: Cache;
  private transactionManager: TransactionManager;
  private domainUrl: string;
  private tokenIssuer: string;
  private readonly DEFAULT_SCOPE = 'openid profile email';

  constructor(private options: Auth0ClientOptions) {
    this.cache = new Cache();
    this.transactionManager = new TransactionManager();
    this.domainUrl = `https://${this.options.domain}`;

browser-tabs-lock

provides locking mechanism to sync across browser tabs

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis

Popular browser-tabs-lock functions