Skip to content

Commit

Permalink
chore(mobile): [Auth] show social auth error toast
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdev98 authored and duongdev committed Jul 29, 2024
1 parent 65232d3 commit c425420
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/mobile/components/auth/auth-social.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useOAuth } from '@clerk/clerk-expo'
import { t } from '@lingui/macro'
import { useLingui } from '@lingui/react'
import type { SvgProps } from 'react-native-svg'
import { toast } from '../common/toast'
import { AppleLogo } from '../svg-assets/apple-logo'
import { GoogleLogo } from '../svg-assets/google-logo'
import { Button } from '../ui/button'
Expand Down Expand Up @@ -36,8 +37,11 @@ export function AuthSocial({ label, icon: Icon, strategy }: AuthSocialProps) {
} else {
// Use signIn or signUp for next steps such as MFA
}
} catch (err) {
console.error('OAuth error', err)
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
} catch (err: any) {
toast.error(
err?.errors?.[0]?.longMessage ?? err.message ?? 'Unknown error',
)
}
}

Expand Down

0 comments on commit c425420

Please sign in to comment.