Closed VTrofym closed 1 year ago
This might help https://www.youtube.com/watch?v=VH1YBcVmM-M
Hello and thanks for reporting, this module wraps the google sign in SDK and returns to you whatever the native SDK provided. If you received no photo url it's because the native SDK did not provide it. This is not an issue with this package.
Thank you 🙂
@VTrofym did you found a solution for it??
I have a problem - when requesting GoogleSignin to any of these methods: getCurrentUser(), signIn() on android with photo comes null. At the same time, the correct path comes to iOS. Earlier the request for android came correct. This problem came up recently. "photo": null - on android "photo": "https://lh3.googleusercontent.com/....... correct way ...." - on ios
WARN ReactImageView: Image source "null" doesn't exist
here is part of the code I am working with
import { GoogleSignin, User } from '@react-native-google-signin/google-signin';
const ProfileScreen: FC = ({ navigation }) => {
const [user, setUser] = useState<User['user'] | null>();
const getCurrentUser = useCallback(async () => {
const currentUser = await GoogleSignin.getCurrentUser();
setUser(currentUser?.user);
}, []);
useEffect(() => {
getCurrentUser();
}, [getCurrentUser]);
const imageSource =
user && typeof user?.photo === 'string'
? { uri: user.photo }
: { source: user?.photo };
return (
); };