()
| 84 | * Creates an anonymous session for when auth is disabled. |
| 85 | */ |
| 86 | export function createAnonymousSession(): AnonymousSession { |
| 87 | const now = new Date() |
| 88 | return { |
| 89 | user: { |
| 90 | ...ANONYMOUS_USER, |
| 91 | createdAt: now, |
| 92 | updatedAt: now, |
| 93 | }, |
| 94 | session: { |
| 95 | id: 'anonymous-session', |
| 96 | userId: ANONYMOUS_USER_ID, |
| 97 | expiresAt: new Date(Date.now() + 365 * 24 * 60 * 60 * 1000), // 1 year |
| 98 | createdAt: now, |
| 99 | updatedAt: now, |
| 100 | token: 'anonymous-token', |
| 101 | ipAddress: null, |
| 102 | userAgent: null, |
| 103 | }, |
| 104 | } |
| 105 | } |
no outgoing calls
no test coverage detected