I am developping a new solution composed of an ASP.NET Core server, an Angular SPA and a remote OpenID Connect server (IdentityServer4). I would like to allow users to connect using their local Identity user account when the remote OpenID Connect server is not reachable, for example when internet connection is lost.
By default, local accounts, when using Asp.Net CORE Identity, are relying on cookies, which is obviously bad, because I want the Angular SPA to use ONLY OpenID Connect, instead of developping several providers/flows.
Is it possible to develop an authorize endpoint (I'm using ONLY the 'implicit' grant type) on my ASP.NET Core server app which would redirect to my OpenID Connect server's authorize endpoint when it is reachable, and that would return a locally computed token when the OpenID Connect server is unavailable? This way, my Angular SPA would only know the authorize endpoint of my ASP.NET Core server, and the latter would be able to switch from local to remote accounts depending on needs.
Thanks in advance