Can I use IdentityServer4 spa JS UI instead of asp .net core mvc?

4.1k Views Asked by At

I looked example of IdentityServer4 UI (IdentityServer4.Quickstart.UI) UI in it on the basis of asp .net core mvc. Examples for spa JS UI I have not found. Is is safe to use spa js UI, and how to do it?

3

There are 3 best solutions below

2
On
0
On

The idea of SPA is to avoid redirects affecting the server. And the idea of Open Id Connect is to redirect every app to authorize endpoint (i.e. sign in page) and back. So the answer should be:

The Idp has to have at least one server-driven page

And all the rest are mostly utility pages and might be moved to SPA, separate apps etc. For instance in the suite, I'm currently busy with, we have most UI in SPAs, including user management and so on, but IdSrv is still MVC carrying login/logged-out and a couple error views only.

0
On

Short Answer is no, IdentityServer4 is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core per its docs.

But you can have SPA UI as client, here is link for SPA samples (vanilla JS) https://github.com/IdentityServer/IdentityServer4/tree/master/samples/Clients/src/JsOidc