title: Angular get data from kerberos authentication
body: <p>I have an angular application with a backend. The authentication is managed by the browser with Kerberos before the app has started. The response contains a JWT with roles in it.</p>
  
  <p>My approach is an extra HTTP call to the server when the app is starting to get the users credentials. This is realized with the <code>APP_INITIALIZER</code> in <code>app.module.ts</code>, so I already have the credentials when the app has started.</p>
  
  <pre><code>providers: [
      ...,
      {
        provide: APP_INITIALIZER,
        useFactory: Utilitys.authServiceFactory,
        deps: [AuthenticationService],
        multi: true   
      }]
  </code></pre>
  
  <p>This is working fine. <strong>But my question is:</strong> Do I have to make an extra call or is there a way to get the response from the browsers request?</p>
  
  <p><strong>If yes:</strong> How is it possible?</p>
  
  <p><strong>If no:</strong> Is the <code>APP_INITIALIZER</code> a recommended way to fetch the data only once? Or should I protect all routes with a <code>route guard</code> that does the HTTP call?</p>