Overview
The Timeback SDK provides a SolidStart adapter using middleware.Installation
Server Setup
Create a server-only Timeback instance. The session helpers below belong to your application: persist the callback user in your authenticated session, and return that session user (includingemail) or null from getUser. These helpers are not SDK exports. Keep API and SSO secrets on the server:
src/lib/timeback.ts
Middleware
Create middleware to handle Timeback routes:src/middleware.ts
Alternative: Route-Based Handler
For more control, you can use a route-based approach instead of middleware:src/routes/api/timeback/[...path].ts
Client Provider
Wrap your app with the TimebackProvider:src/app.tsx
Usage
Use primitives in components:src/components/UserStatus.tsx
Next Steps
Solid Client
Client-side Solid integration
Identity
Authentication options
Custom Activities
Track learning sessions