❔ Redirect all unauthenticated requests for an SPA to OAuth

I have an Angular SPA app. I don't want them to be able to load any of the assets on this server without a validated JWT token from IdentityServer. How can I redirect before anything is served?
2 Replies
Dusty
Dusty2y ago
You could use a middleware and register it before anything else. And check inside the middleware for the token There could be better ways though
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server