Bluesky app fork with some witchin' additions 馃挮
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 38 lines 1.0 kB view raw
1import {useEffect} from 'react' 2import {useNavigation} from '@react-navigation/native' 3 4import {type NavigationProp} from '#/lib/routes/types' 5import {logger} from '#/logger' 6import {useSessionApi} from '#/state/session' 7import {getWebOAuthClient} from '#/state/session/oauth-web-client' 8 9export function AuthCallback() { 10 const {login} = useSessionApi() 11 const navigation = useNavigation<NavigationProp>() 12 13 useEffect(() => { 14 ;(async () => { 15 try { 16 const client = getWebOAuthClient() 17 const result = await client.init() 18 if (result?.session) { 19 await login( 20 { 21 service: '', 22 identifier: '', 23 password: '', 24 oauthSession: result.session, 25 }, 26 'LoginForm', 27 ) 28 } 29 navigation.replace('Home') 30 } catch (e: any) { 31 logger.error('OAuth callback failed', {error: e.message}) 32 navigation.replace('Home') 33 } 34 })() 35 }, [login, navigation]) 36 37 return null 38}