We have a ServiceStack API that requires authentication and I was trying to start a frontend project without the server side part, what is the recommended flow?
I’m trying to avoid having a C# page that actually authenticates and then serves as a proxy between the frontend part and the API service.
What should I start looking in order to create my admin frontend that will get data from a ServiceStack API?
Just gathering the best ideas so I don’t hit a wall or two in the middle of the project had have to redo it
I’m really struggling to understand what you’re asking in all these questions…
How can you require authentication without the server side? What are you authenticating against?
Are you talking about Razor here, you don’t want to use Razor you just want to use static html, is that the question?
Maybe if you compare what you’re trying to do against something real your goals would become clearer. Can you refer to an Live Demo Example that’s close to what you’re after and explain what you want to do differently?
You’re going to run into CORS issues if you try to host the API and static website on different domains.
But the React Chat may be pretty close to what you’re after, the client app itself doesn’t have any coupling with the Server Web Application, i.e. it’s a TypeScript / React project that compiles down to a static default.html + .js library, it could just as easily be your JS fx of choice. But it does benefit from being deployed together as a single WebDeploy package.
If you want to run on different domains you’ll need to enable CORS, but otherwise it should be the same - use Ajax to communicate with the backend APIs.