SkillAgentSearch skills...

security

The project will use session-based authentication.

Install / Use

npx skills add gimzani/SwiftFollowup

Installs into whichever agent you are using.

About this skill
🔧

.clinerules

Cline rules

Quality Score

55/100

Category

Security

Supported Platforms

Cline

Authentication and Security

The project will use session-based authentication.

Technologies

Auth Flow

These are the required flows for a functional application:

Register

  • Hash password with argon2
  • Create user
  • Create email verification token
  • Send email

Login

  • user fills out form, submits to api
  • Find user by email and (hashed) password
  • create session in db
  • set session cookie

Auth Middleware ( Fastify Hook )

  • API is called
  • API uses middleware to validate session token (cookie)
    • if valid, API Executes
    • if invalid, API returns 401

Logout

  • Delete session from DB
  • Clear cookie

Auth Routes

To future-proof this app, use the following auth routes:

/auth/login
/auth/logout
/auth/me

Security

Email is the identity anchor. Always verify email before full access. Treat email change as sensitive action.

  1. Hash EVERYTHING sensitive
  • passwords → argon2
  • session tokens → SHA-256
  • reset tokens → SHA-256
  1. Rate limit auth routes
  • Use:

    • @fastify/rate-limit
  • Protect:

    • /login
    • /register
    • /forgot-password

Related Skills

View on GitHub
GitHub Stars0
CategorySecurity
UpdatedNaNy ago
Forks0

Security Score

68/100

Audited on Invalid Date

2 medium1 low