Skip to main content

Function: initializeOAuth()

initializeOAuth(): Promise<null | { agent: Agent; session: OAuthSession; user: ChiveUser; }>

Defined in: web/lib/auth/oauth-client.ts:247

Initialize OAuth client and handle any pending callback.

Returns

Promise<null | { agent: Agent; session: OAuthSession; user: ChiveUser; }>

Session result if callback was handled, null otherwise

Remarks

Call this on app startup to:

  1. Handle OAuth callbacks (if returning from authorization)
  2. Restore existing sessions from IndexedDB