title: Error: Invalid state auth0
body: <p>I am trying to implement auth0 in my angular 5 app, following this tutorial:
  <a href="https://toddmotto.com/angular-2-authentication" rel="nofollow noreferrer">https://toddmotto.com/angular-2-authentication</a></p>
  
  <p>The register works properly but when I try to log in I get the following in the console: <a href="https://i.stack.imgur.com/jLYFA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jLYFA.png" alt="enter image description here"></a></p>
  
  <p>This is my auth service:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  
  // We want to avoid any 'name not found'
  // warnings from TypeScript
  declare var Auth0Lock: any;
  
  
  @Injectable()
  export class AuthService {
      private lock
  
      constructor() {
          // These stuff should be exported into other files
          this.lock = new Auth0Lock('id...',
              'url...')
      }
  
      login() {
          this.lock.show((error: string, profile: Object, id_token: string) =&gt; {
              if (error) {
                  console.log(error);
              } else {
                  console.log(profile)
                  localStorage.setItem('profile', JSON.stringify(profile));
                  localStorage.setItem('id_token', id_token);
              }
          });
      }
  
      logout() {
          localStorage.removeItem('profile');
          localStorage.removeItem('id_token');
      }
  }
  </code></pre>
  
  <p>Any ideas?</p>