( account: Account, user: NextUser | AdapterUser, profile: Profile | undefined )
| 336 | } catch (error) { |
| 337 | captureException(error, { |
| 338 | tags: { operation: 'openai_chatgpt_connection_persist' }, |
| 339 | }); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | function createAppleAccountInfo( |
| 344 | account: Account, |
| 345 | user: NextUser | AdapterUser |
| 346 | ): CreateOrUpdateUserArgs | null { |
| 347 | if (account.provider !== 'apple') return null; |
| 348 | assert(user.email, 'User email is required for Apple auth'); |
| 349 | |
| 350 | return { |
| 351 | google_user_email: user.email, |
| 352 | google_user_name: user.name || user.email.split('@')[0], |
| 353 | google_user_image_url: '', |
| 354 | hosted_domain: hosted_domain_specials.apple, |
| 355 | provider: account.provider, |
| 356 | provider_account_id: account.providerAccountId, |
| 357 | display_name: null, |
| 358 | }; |
| 359 | } |
| 360 | |
| 361 | function createGitHubAccountInfo( |
| 362 | account: Account, |
no test coverage detected