How to use the auth0-js/build/auth0.WebAuth function in auth0-js

To help you get started, we’ve selected a few auth0-js 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 freeCodeCamp-China / learn / src / auth / index.js View on Github external
constructor() {
    this.auth0 = new auth0.WebAuth({
      redirectUri: `${
        typeof window !== 'undefined' ? window.location.origin : ''
      audience: `https://${domain}/api/v2/`,
      responseType: 'token id_token',
      scope: `openid profile email ${namespace + 'accountLinkId'}`

    this.getUser = this.getUser.bind(this);
    this.getToken = this.getToken.bind(this);
    this.handleAuthentication = this.handleAuthentication.bind(this);
    this.isAuthenticated = this.isAuthenticated.bind(this);
    this.login = this.login.bind(this);
    this.logout = this.logout.bind(this);


Auth0 headless browser sdk

Latest version published 20 days ago

Package Health Score

86 / 100
Full package analysis