Skip to content
Superfluid Stream Gating JWT

Superfluid Stream Gating JWT

Streamline your content access with Superfluid Stream Gating JWT

178

Created on 25th March 2023

•

Superfluid Stream Gating JWT

Superfluid Stream Gating JWT

Streamline your content access with Superfluid Stream Gating JWT

The problem Superfluid Stream Gating JWT solves

Superfluid Stream Gating solves the problem of restricting access to certain resources by creating a secure gateway using Superfluid streams and JWT tokens. It allows for easy and flexible access control to protect valuable content from unauthorized access. This is immensely reusable building block for many server gated resources that often easy to plug a jwt token auth module.
This project tried to implement superfluid streams gating mechanism as mentioned in the problem statement by providing a serverless function that generates JWTs on-demand for authorized users. This function is built using the Netlify/AWS Lambda serverless architecture and is written in Node.js. It requires a list of authorized API keys and a secret key to generate JWT tokens. When a user sends a request to the function with a valid API key, it uses the Superfluid protocol subgraph to check if a stream exists for the specified sender, receiver, and token. If a stream exists, it generates a JWT token using the secret key and either returns the token and redirect URL or redirects the user to the protected resource with the token appended as a query parameter.

Discussion

Builders also viewed

See more projects on Devfolio