title: angular-oauth2-oidc token always invalid after log in
body: <p>I am trying to follow the guide on the documentation <a href="https://github.com/manfredsteyer/angular-oauth2-oidc" rel="nofollow noreferrer">https://github.com/manfredsteyer/angular-oauth2-oidc</a>.</p>
  
  <p>I have the following config in my constructor for the service:</p>
  
  <pre><code>authCodeFlowConfig: AuthConfig = {
     issuer: 'https://demo.identityserver.io',
     redirectUri: window.location.origin + '/home',
     clientId: 'spa',
     responseType: 'code',
     scope: 'openid profile email offline_access api',
     showDebugInformation: true
   };
  
  this.oauthService.configure(this.authCodeFlowConfig);
  </code></pre>
  
  <p>(i have also tried with a redirect url of index.html but that didnt seem to make a difference)</p>
  
  <p>Logging in seems to work just fine i get the redirect to the page log in and get redirected home:</p>
  
  <pre><code>    this.oauthService.loadDiscoveryDocumentAndTryLogin().then((response) =&gt; {
        if (!this.oauthService.hasValidIdToken() || !this.oauthService.hasValidAccessToken()) {
           this.oauthService.initCodeFlow();
        }
      }).catch((err) =&gt; {
        console.log(err);
      });
  </code></pre>
  
  <p>However the following still returns false, false, null:</p>
  
  <pre><code>    const claims = this.oauthService.getIdentityClaims();
      console.log(this.oauthService.hasValidIdToken());
      console.log(this.oauthService.hasValidAccessToken());
      console.log(claims);
  </code></pre>
  
  <p>I have a code= in my url have no other changes to the service and everything seems to have logged me in.
  I'm expecting to have done something stupid or misunderstood what is going on but any advice would be helpful.</p>