ToolypetMCP
advanced10 minutescross hub

Full-Stack Security Setup

Comprehensive security setup: password hashing, JWT auth, CSP, CORS, security headers, and 2FA.

securityfull-stackauthcspcors

Quando usar esta receita

Complete security foundation for a new web application. Covers authentication, authorization, browser security, and API protection in one workflow.

Etapas

1

Create secure initial passwords

Prompt:Generate strong default passwords for admin accounts
2

Securely hash passwords

Prompt:Hash passwords with bcrypt for database storage
3

Create application secrets

Prompt:Generate JWT signing secret, session secret, and API keys
4

Configure JWT authentication

Prompt:Set up JWT token generation with proper claims and expiration
5

Lock down content loading

Prompt:Generate strict Content Security Policy
6

Set up cross-origin access

Prompt:Configure CORS for API and frontend domains

Perguntas frequentes

What security should every web app have at minimum?

HTTPS, secure password hashing (bcrypt/argon2), CSRF protection, CSP headers, rate limiting, and input validation. This recipe covers most of these.

How often should I rotate secrets and keys?

JWT signing keys: every 90 days. API keys: every 180 days or on team changes. Session secrets: on every deployment. Passwords: on suspected breach only (not on a schedule).

Receitas relacionadas