I have been using Auth0 authentication successfully with my web app for quite a while.
I now have a need to communicate to a cloud-based system via their API which itself requires authentication. I have used their test app (in isolation) and I can authenticate successfully.
The problem I have is to incorporate both authentications into the one program.
My scenario is briefly as follows:
- A user logs in to my web app and authenticates via Auth0. [works ok]
- The authenticated user uses my web app. [works ok]
- At some later time, the user wants to read some data from an external system. In order to call their API, the user needs to authenticate against the the external system. [not working]
- Once authenticated, my app would retrieve the necessary data from the external system and show the information in my web app.
In step 3 above, I don’t understand how to write the code in the ConfigureServices method in startup.cs so that I end up with 2 separate identity objects. One for my web app and the other for the external system.
I’m hoping someone can help me or show me some example code.