Tags: workos/authkit-tanstack-start
Tags
fix: use Node 24 for npm 11+ (required by Trusted Publishers) (#39) * fix: use Node 24 for npm 11+ (required by Trusted Publishers) Node.js 24 LTS ships with npm 11.6.2, meeting the npm 11.5.1+ requirement for OIDC Trusted Publishers. * increment patch version
v0.2.0 (#13) ## Summary This release adds new callback customization features and fixes critical bugs in session management and development setup. ## Changes ### ✨ Features - **Add onSuccess and onError hooks to callback route** (#9) - Changed `handleCallbackRoute` from direct handler to factory function accepting options - `onSuccess` hook provides access to full auth data (oauthTokens, authenticationMethod, organizationId, custom state) - `onError` hook enables custom error responses and logging - Provides feature parity with Next.js SDK - **Breaking change**: `handleCallbackRoute()` now requires parentheses (options parameter is optional) ### 🐛 Bug Fixes - **Fix signOut to use configured session cookie name** (#8) - Fixed hardcoded 'wos_session' cookie name - Now dynamically uses configured cookie name via `getConfig('cookieName')` - Resolves auth state confusion after sign-out - Fixes #6 ### 🔧 Maintenance - Remove dotenv direct invocation in vite.config (#10) - Package updates and type fixes ## Migration Guide If you're using `handleCallbackRoute`: **Before:** ```typescript export const Route = createFileRoute('/api/auth/callback')({ loader: handleCallbackRoute }); ``` **After:** ```typescript export const Route = createFileRoute('/api/auth/callback')({ loader: handleCallbackRoute() // Note the parentheses }); ``` Or with hooks: ```typescript loader: handleCallbackRoute({ onSuccess: async (data) => { console.log('User authenticated:', data.user.email); } }) ``` ## Testing - Updated tests to use correct default cookie name - Example app demonstrates new callback hooks