diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index 919591eb5e..237e160d61 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -7,6 +7,7 @@ import {useLingui} from '@lingui/react' import {useAnalytics} from '#/lib/analytics/analytics' import {isAndroid} from 'platform/detection' +import {useLogin} from '#/screens/Login/hooks/useLogin' import {atoms as a} from '#/alf' import {Button, ButtonText} from '#/components/Button' import {FormError} from '#/components/forms/FormError' @@ -32,10 +33,10 @@ export const LoginForm = ({ setServiceUrl: (v: string) => void onPressRetryConnect: () => void onPressBack: () => void - onPressForgotPassword: () => void }) => { const {track} = useAnalytics() const {_} = useLingui() + const {openAuthSession} = useLogin(serviceUrl) // This improves speed at which the browser presents itself on Android React.useEffect(() => { @@ -49,24 +50,6 @@ export const LoginForm = ({ track('Signin:PressedSelectService') }, [track]) - const onPressNext = async () => { - const authSession = await Browser.openAuthSessionAsync( - 'https://bsky.app/login', // Replace this with the PDS auth url - 'bsky://login', // Replace this as well with the appropriate link - { - windowFeatures: {}, - }, - ) - - if (authSession.type !== 'success') { - return - } - - // Handle session storage here - } - - console.log(serviceDescription) - return ( Sign in}> @@ -80,7 +63,7 @@ export const LoginForm = ({ /> - +