useVerifyOAuth hook handles the OAuth redirect and polling step of the authentication flow. Use it as part of a custom step-by-step auth flow, or prefer useAuthenticateWithOAuth for an all-in-one approach.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for verifying OAuth authentication
useVerifyOAuth hook handles the OAuth redirect and polling step of the authentication flow. Use it as part of a custom step-by-step auth flow, or prefer useAuthenticateWithOAuth for an all-in-one approach.
import { useVerifyOAuth } from "@getpara/react-native-wallet";
import { useVerifyOAuth } from "@getpara/react-native-wallet";
import * as WebBrowser from "expo-web-browser";
function OAuthStep() {
const { verifyOAuthAsync, isPending } = useVerifyOAuth();
const handleVerify = async () => {
try {
const result = await verifyOAuthAsync({
method: "GOOGLE",
appScheme: "myapp",
onOAuthUrl: (url) => WebBrowser.openBrowserAsync(url),
});
} catch (err) {
console.error(err);
}
};
return <Button title="Verify with Google" onPress={handleVerify} disabled={isPending} />;
}