How to use the auth0-lock.Auth0Lock function in auth0-lock

To help you get started, we’ve selected a few auth0-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 ACloudGuru-Resources / Course-The_Complete_Serverless_Course / projects / 1 - Authentication with Auth0 / solution / part-2 / auth0-app-frontend / src / App.js View on Github external
super();

    const params = {
      autoclose: true,
      oidcConformant: true,
      auth: {
        audience: `${Config.API_BASE_URL}`,
        params: {
          scope: 'openid profile email'
        },
        responseType: 'token'
      }
    };

    // Instantiate the Auth0Lock library
    const lock = new Auth0Lock(
      Config.AUTH0_CLIENT_ID,
      Config.AUTH0_DOMAIN,
      params
    );
    this.lock = lock;

    // Listen for the authenticated event on the Auth0 lock library and call the 
    // onAuthenticated method
    this.lock.on('authenticated', this.onAuthentication)
  }

auth0-lock

Auth0 Lock

MIT
Latest version published 1 month ago

Package Health Score

87 / 100
Full package analysis