Skip to content

chore: remove dotenv from example vite.config#10

Merged
nicknisi merged 1 commit intomainfrom
nicknisi/dotenv-cleanup
Oct 23, 2025
Merged

chore: remove dotenv from example vite.config#10
nicknisi merged 1 commit intomainfrom
nicknisi/dotenv-cleanup

Conversation

@nicknisi
Copy link
Member

Removes direct dotenv invocation from the example app's vite.config.ts.

TanStack Start loads .env files automatically, so explicitly calling dotenv.config() in the Vite config is unnecessary.

@nicknisi nicknisi requested a review from dandorman October 20, 2025 15:29
@nicknisi nicknisi merged commit d0f5b2e into main Oct 23, 2025
4 checks passed
nicknisi added a commit that referenced this pull request Oct 24, 2025
## 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
@nicknisi nicknisi mentioned this pull request Oct 24, 2025
nicknisi added a commit that referenced this pull request Oct 27, 2025
## 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
nicknisi added a commit that referenced this pull request Oct 27, 2025
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants