Some frameworks come out of the box with client-side-rendering:
Additionally, especially Angular works with the Single Page App approach, therefore, everything is built on top of a single HTML file.
Yet, classic auth approaches work nonetheless.
Auth with a CSR SPA
- The user logs in by sending credentials to the server.
- Upon successful authentication, the server creates a session and stores it (e.g., in memory or a database). It then sends a session ID to the client, typically stored as a cookie.
- The browser automatically includes this session ID in subsequent requests to the server, allowing the server to verify the user’s identity.
For this, JWTs or session auth can be used.