title: Mixed Authentication in .net core API
body: <p>I'm building a multi tenant Service Fabric Application, that allows a tenant to specify a login type - Identity(asp.net)/Azure AD.</p>
  
  <p>I have an Authentication service that checks to which tenant the user is linked to and then proceeds to check if the username:password for the user is valid, if valid it returns a JWT token to the gateway API/web API that then allows access to the rest of the services on the cluster.</p>
  
  <p>This is further secured by roles to limit actions and data access etc.</p>
  
  <p><strong>Question 1</strong>
  What would be a secure way to save the app id and secret given by that tenant if they use azure AD?
  In my DB and encrypt the info, it would have to be decrypted to connect to the AD(Trying to keep in dynamic).</p>
  
  <p><strong>Question 2</strong>
  I'm implementing my own sliding refresh tokens to obtain a new JWT after it expires, is there a better/standard approach?</p>
  
  <p><strong>Question 3</strong>
  Is there a better/standard way to handle this multi-tenant sign in process.</p>
  
  <p><strong>Question 4</strong>
  Is there a way to have optional claims set on the JWT Subject that would allow access to shared services but prevent access to tenant specific services if the claim value is incorrect?</p>
  
  <p><strong>Edit</strong>
  Ideally the Roles should not be part of the tenants AD/B2C because they role are dynamic and managed from within the application.</p>