Untitled
unknown
plain_text
a year ago
757 B
8
Indexable
import { Linking } from 'react-native';
import { useEffect } from 'react';
const App = () => {
useEffect(() => {
const handleUrl = (event) => {
const { url } = event;
console.log('Redirected URL:', url);
// Extract tokens or handle the redirect logic here
if (url.startsWith('vunoride://open')) {
// Handle successful login
console.log('Google Sign-In success, redirected to app');
}
};
// Add listener for incoming links
const linkingListener = Linking.addEventListener('url', handleUrl);
// Cleanup listener on unmount
return () => linkingListener.remove();
}, []);
return <YourAppComponent />;
};
Editor is loading...
Leave a Comment