title: Authenticate API Requests in Spring using Firebase Auth
body: <p>Im already authenticating access to my API using a Firebase Auth token (JWT) which is passed inside the Http Authorization Header as Bearer token. This works fine using auto configuration. Now I want to map from the authentication to a user record in my DB. How do I need to adapt the security filter chain? This configuration is automatically applied by spring boot according to the <a href="https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#oauth2resourceserver-sansboot" rel="nofollow noreferrer">docs</a> and can be overridden: </p>
  
  <pre><code>@Override
  protected void configure(HttpSecurity http) throws Exception {
      http
              .authorizeRequests().anyRequest().authenticated()
              .and().oauth2ResourceServer().jwt();
  }
  </code></pre>
  
  <p>I am using the Firebase Authentication UI drop in solution which provides the access token on a successful authentication. This token then gets passed to my API.</p>