I’ve been trying to follow the examples in Expo’s guide to implement Google and Facebook authentication but every time I call promptAsync
I find that the URL it gives is something like auth.expo.io/UNVERIFIED-{local.ip.address}-{slug}/...
instead of having @username/slug
, and the page brought up simply displays ‘Not found’.
As far as I can discern there is nothing wrong with the hooks I’ve written as the code is nearly identical to that of Expo’s guides. For example, the Google authentication hook:
import React, { useEffect } from 'react';
import * as WebBrowser from 'expo-web-browser';
import * as Google from 'expo-auth-session/providers/google';
import firebase from 'firebase';
export const useGoogleAuth = () => {
WebBrowser.maybeCompleteAuthSession();
const [req, res, promptAsync] = Google.useIdTokenAuthRequest({
clientId: '{MY_CLIENT_ID}.apps.googleusercontent.com',
})
useEffect(() => {
if (res?.type === 'success') {
const { id_token: idToken } = res.params;
console.log('Google ID token', idToken);
const credential = firebase.auth.GoogleAuthProvider.credential(idToken);
firebase.auth().signInWithCredential(credential);
}
}, [res])
return { req, res, promptAsync }
}
Would anyone be able to advise as to what the issue is here? An appropriate scheme, slug and owner are set in the app.json
file so I’m not sure where the problem is.
This is on SDK version 41 with the latest CLI version.