Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Cloudflare Full-Stack Development
·
Module 8
المصادقة وتأمين واجهات برمجة التطبيقات (APIs)
1
Secure User Registration with Web Crypto and D1
Implement user registration by hashing passwords with the Web Crypto API and storing user data in D1.
Secure Login with JWT Authentication
Build a login endpoint that verifies credentials and issues a signed JWT containing user ID and role.
3
Securing Hono Endpoints with JWT Middleware
Create a protected middleware in Hono using `hono/jwt` that verifies the JWT on incoming requests.
4
JWT & RBAC: Role-Based Access Control Implementation
Implement Role-Based Access Control (RBAC) by checking for a specific role (e.g., 'admin') from the JWT payload.
5
Hono CORS: Allowing Specific Frontend Domains
Configure Cross-Origin Resource Sharing (CORS) policies in Hono to allow requests from a specific frontend domain.
Cloudflare Rate Limiting for Sensitive Endpoints
Apply basic rate limiting to sensitive endpoints using Cloudflare's built-in tools to prevent abuse.
Previous module
قواعد البيانات العلائقية على الحافة (Edge) باستخدام D1
Next module
تخزين الملفات واستضافة الواجهات الأمامية