I am having some difficulty with a package im using for my google sign up, ie "@clerk/clerk-expo": "^0.19.15". It works on my Expo Go app but once it's built, the google login button doesnt link you to the google sign in page.
app.config.js
module.exports = {
name: 'elle-carservice',
version: '1.0.0',
extra: {
clerkPublishableKey: process.env.CLERK_PUBLISHABLE_KEY,
},
"expo": {
"name": "elle-carservice",
"slug": "elle-carservice",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon1.png",
"userInterfaceStyle": "light",
"notification":{
"icon":"./assets/icon1.png"
loginScreen.js
<SignedIn>
<UserData
navigation={navigation}
data={data}
setData={setData}
/>
</SignedIn>
<SignedOut>
<CustomText
viewStyle={textRegisterStyles.textRegister}
textStyle={textRegisterStyles.textRegisterText}
text={i18n.t('Already a member?')}
/>
{staticData.savedLocation ?
(<View style={styles.bottomMargin}>
<GoogleLoginButton />
<View style={{ marginTop: 10 }}>
<FacebookLoginButton />
</View>
</View>)
: null}
<View style={styles.registerNavButton}>
<CustomText
viewStyle={textRegisterStyles.textRegister}
textStyle={textRegisterStyles.textRegisterText}
text={i18n.t('Not a member?')}
/>
</View>
userData.js
const UserData = ({navigation, data, setData}) => {
const { isLoaded, isSignedIn, user } = useUser();
const { signin, state } = useContext(AuthContext);
if ((isLoaded || isSignedIn) && Object.hasOwn(state, 'registered')) {
let userData = {name: null, password: null, firstname: user.firstName, lastname: user.lastName, email: null, image: user.imageUrl};
if (user.externalAccounts[0].provider == 'google') {
userData.email = user.primaryEmailAddress.emailAddress;
const usrPassArray = user.primaryEmailAddress.emailAddress.split("@");
userData.name = usrPassArray[0];
userData.password = usrPassArray[0];
}
if (user.externalAccounts[0].provider == 'facebook') {
userData.name = user.id;
userData.password = user.id;
}
navigation.navigate("PreregisterScreen", {user: userData});
}
}
It all works on Expo Go when I run npx expo start -c but once i do an EAS build, the google sign in button does not navigate to the google sign in screen. There is a wrning however on Expo Go;
"Linking requires a build-time setting scheme
in the project's Expo config (app.config.js or app.json) for production apps, if it's left blank, your app may crash. The scheme does not apply to development in the Expo client but you should add it as soon as you start working with Linking to avoid creating a broken build. Learn more: https://docs.expo.dev/guides/linking/".
I tried adding a sheme but not sure what to add. Can someone please help.