syncweek-react-aad / react-aad

A React wrapper for Azure AD using the Microsoft Authentication Library (MSAL). The easiest way to integrate AzureAD with your React for authentication.
MIT License
344 stars 94 forks source link

Cache daemon/application secret auth token #203

Open badeyjohnson opened 4 years ago

badeyjohnson commented 4 years ago

Is your feature request related to a problem? Please describe. I have an app which when I don't want have a user sign in while testing. I have client credentials grant type (application secret) oauth2 flow set up which provides a token, but I cannot work out how to store it in the cache so AzureAD component automatically registers a valid logged in session.

Describe the solution you'd like To be able to store a token gained through the application secret oauth2 flow so the user never has to go through the interactive login process.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context I have tried looking at the UserAgentApplication functions but cannot work out if there is one which achieves it or how to use it to cache it in the right place.