outseta/agent-toolkit
Overview
This skill packages Outseta integration patterns, templates, and examples to accelerate building SaaS features like authentication, billing, CRM, and support. It provides ready-to-use front-end embeds (HTML/JS) and React components plus server-side snippets for JWT verification, webhook handling, and billing/usage tracking. Use it to treat Outseta as the source of truth for user identity and subscription state so you can focus on product logic.
How this skill works
The skill documents Outseta's relational data model (Person, Account, PersonAccount) and shows how to wire those entities into your app. It supplies front-end embeds and a React AuthProvider/useAuth pattern to manage sessions and gated UI. On the server it shows JWT verification against Outseta JWKS, webhook signature verification, and REST API calls for account and subscription management.
When to use it
- You need unified auth, billing, CRM, and support without building each system from scratch.
- You want Outseta to be the primary source of truth for user identity and payment status.
- You are building a React SPA and want a robust AuthProvider and protected routes.
- You need simple HTML/JS embeds for no-code or low-code projects.
- You must verify JWTs or securely handle Outseta webhooks server-side.
Best practices
- Use Outseta Uid values as foreign keys in your database to maintain consistent identities.
- Prefer AuthProvider/useAuth in React SPAs rather than relying solely on data-outseta attributes.
- Always verify JWTs against Outseta’s JWKS and validate webhook signatures with the SHA256 secret.
- Treat Outseta as the source of truth for subscription and billing status; sync via webhooks.
- Use overlays/widgets for quick UX, and server-side REST calls for administrative workflows.
Example use cases
- Add login, signup, and profile overlays with simple HTML embeds for a marketing site.
- Protect React routes and conditionally render UI based on subscription plan via useAuth.
- Receive Activity Notifications to sync new accounts or subscription changes into your DB.
- Implement server-side JWT validation to authorize API requests tied to an Outseta user.
- Trigger in-app purchase dialogs or add-on purchases from a React component.
FAQ
For simple sites or no-code flows use the script attributes; for SPAs prefer the React AuthProvider/useAuth pattern for more reliable state and conditional rendering.
How do I secure webhooks and JWTs?
Verify webhook signatures using the SHA256 secret from the dashboard and validate JWTs server-side against Outseta's JWKS to ensure tokens are unmodified and current.