diff --git a/src/screens/Login/hooks/useLogin.web.ts b/src/screens/Login/hooks/useLogin.web.ts index e69de29bb2..6c16bc1810 100644 --- a/src/screens/Login/hooks/useLogin.web.ts +++ b/src/screens/Login/hooks/useLogin.web.ts @@ -0,0 +1,13 @@ +import React from 'react' + +export function useLogin(serviceUrl: string | undefined) { + const openAuthSession = React.useCallback(async () => { + if (!serviceUrl) return + + window.location.href = serviceUrl + }, [serviceUrl]) + + return { + openAuthSession, + } +}