Skip to content
Back to skills

Saas Auth Billing

ASecurity

Auth, multi-tenant access rules and Stripe billing for a SaaS. Use when touching sign-in, sessions, roles, organisations/teams, plans, checkout, subscriptions or payment webhooks.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentssecurity

Works with

  • cli

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add kinleyrabgay/coxswain --skill saas-auth-billing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Saas Auth Billing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Saas Auth Billing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kinleyrabgay-saas-auth-billing/badge)](https://www.skillsdirectory.com/skills/kinleyrabgay-saas-auth-billing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: saas-auth-billing
description: Auth, multi-tenant access rules and Stripe billing for a SaaS. Use when touching sign-in, sessions, roles, organisations/teams, plans, checkout, subscriptions or payment webhooks.
---
# Auth, tenants and billing

These areas are security-sensitive: changes here always get a security review.

## Auth and sessions
- Use the project's existing auth library and helpers; never hand-roll password hashing, tokens or cookies.
- Protect pages in middleware *and* check again in every server action / handler (middleware alone is not authorisation).
- Session cookies: `httpOnly`, `secure`, `sameSite=lax` or stricter. Never put tokens in URLs or localStorage.

## Tenants (organisations / teams)
- Every query on tenant data filters by the current tenant. Add the filter in the data-access helper, not in each caller.
- Roles are checked on the server. UI hiding is only cosmetic.
- Invites: single-use, expiring tokens; accepting one checks the email matches.

## Stripe billing
- Prices and plans come from config or Stripe, never from the client request.
- Checkout/portal sessions are created server-side for the signed-in customer only.
- **Webhooks**: verify the signature with the raw body and the endpoint secret; handle each event idempotently (store processed event IDs); return 2xx quickly; derive state from Stripe objects, not from the client.
- Entitlements: one helper decides what a plan allows (`canUse(feature)`), used by both UI and server.
- Test with Stripe test mode and recorded fixtures. Never use real cards or live keys in tests or the browser.

## Never
- Log secrets, tokens, full card data or webhook payloads with personal data.
- Commit `.env*` files or keys. Ask a human for any credential you need.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.