As more and more websites offer personalised services, the need for authentication becomes increasingly important.
Authentication is the process of verifying the identity of a user to ensure that they have the necessary permissions to access certain content or services. This is particularly important for websites that deal with sensitive information or offer exclusive content, such as B2B prices.
By requiring users to log in before accessing certain content, website owners can ensure that only authorised users have access to that content. This can help prevent unauthorised access to sensitive information, protect intellectual property, and ensure that only paying customers have access to premium content.
How to implement with Enterspeed
Enterspeed works as a highspeed cache which, unlike a traditional cache, also allows you to transform and combine multiple data sources into highspeed generated views.
Other than the Environment client API key, which you need to fetch from our Delivery API, there is no authentication regarding who can see what in your Delivery API.
Does this mean you can't use Enterspeed for gated/exclusive content, such as B2B prices? Not at all.
This simply means you have to handle this logic server side in your application, as you usually would anyway. One way to do it is via middleware, which we have written an article about here.
Here's an example of how this could be done in Next.js. Example borrowed from the Next.js JWT Authentication template.