K
Kinde4mo ago
GabriFila

New Expo SDK setup

Hello, I'm trying to setup a project with the latest Expo SDK (btw thanks for it) following what is in the README. This is pretty much the code
const Main = () => {
const { isAuthenticated, login } = useKindeAuth();

return (
<View>
<Text>isAuthenticated {String(isAuthenticated)}</Text>
<Button
title='Login'
onPress={async () => {
const token = await login();
console.log('LOGIN ERROR', token);
}}
/>
</View>
);
};

export default function RootLayout() {
return (
<KindeAuthProvider>
<Main />
</KindeAuthProvider>
);
}
const Main = () => {
const { isAuthenticated, login } = useKindeAuth();

return (
<View>
<Text>isAuthenticated {String(isAuthenticated)}</Text>
<Button
title='Login'
onPress={async () => {
const token = await login();
console.log('LOGIN ERROR', token);
}}
/>
</View>
);
};

export default function RootLayout() {
return (
<KindeAuthProvider>
<Main />
</KindeAuthProvider>
);
}
I'm using Android, when I try to run it in Expo Go I manage to login but when I try it in a development build (built with the latest dependancies) I get an error from the login method after redirecting from the browser to the app: {"errorMessage": "No discovery document", "success": false}. Also Expo Router logs the warning once redirecting from the browser back to the appThe navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration. which I believe it is related to some missing paths that need to be configured but could have nothing to do with Kinde. Am I missing something? Do I need to include other environment variables except those mentioned in the docs (EXPO_PUBLIC_KINDE_DOMAIN,EXPO_PUBLIC_KINDE_CLIENT_ID,EXPO_PUBLIC_KINDE_SCOPES)? Do I need to include other paths? I found other issues with using the SDK on the web but I'd first like to solve the ones I mentioned for Thanks for any help, we'd really love to use Kinde with Expo so if you need any other info please let me know
2 Replies
Daniel_Kinde
Daniel_Kinde4mo ago
Hi, we are aware of this, I am currently working on a solution. I believe this is a race condition which is affecting non expo go builds.
GabriFila
GabriFilaOP4mo ago
Ok thanks, I assumed it was something simpler I was missing. We actually need to use Kinde on the web. When starting the app on the web I see the following error: _ExpoSecureStore.default.getValueWithKeyAsync is not a function. I believe it is thrown because on the web the ExpoSecureStore is not available Are you planning on supporting the web platform with Expo? I'd like to deploy the app in early September, is it safe to assume it will be ready by then? If not, do you have a set timeline? We are available for any feedback and thank you very much
Want results from more Discord servers?
Add your server