K
Kinde7mo ago
Chepe

React Native Expo-secure-storage

Hello there, when building Android the app crash due to the expo-secure-storage, I think I followed all the steps in order to implement SDK but Im not sure if I'm missing something, The project is full expo not bare RN
13 Replies
Oli - Kinde
Oli - Kinde7mo ago
Hey @Chepe, Thanks for reaching out. What SDk and version are you using?
Chepe
ChepeOP7mo ago
kinde-oss/react-native-sdk-0-7x -> 1.3.0
Daniel_Kinde
Daniel_Kinde7mo ago
Hi, what are your timescales? We are near to releasing a new Expo SDK
Chepe
ChepeOP7mo ago
Do you have any expected date for that release ? also, is this a known error ? Because Im wondering if Im doing something wrong on my end
jonericcook
jonericcook7mo ago
@Chepe i think it's this? https://www.npmjs.com/package/@kinde/expo Yea @Daniel_Kinde ?
npm
@kinde/expo
The Kinde Expo SDK allows developers to quickly and securely integrate a new or an existing Expo application into the Kinde platform.. Latest version: 0.1.0, last published: 13 hours ago. Start using @kinde/expo in your project by running npm i @kinde/expo. There are no other projects in the npm registry using @kinde/expo.
Daniel_Kinde
Daniel_Kinde7mo ago
Hi @jonericcook, correct. Its on a soft release at the moment as documentation is not ready, any questions or issues please let me know.
jonericcook
jonericcook7mo ago
do you know if there will be an announcement for when the above package is ready for prime time?
Daniel_Kinde
Daniel_Kinde7mo ago
@jonericcook The package is really just waiting for documentation to be finalised.
Tito
Tito7d ago
I am trying this out again on expo with the latest 0.2.0 version and a fresh new expo app (20 jan 2025), it fails with No discovery document on ios simulator, it fails with [Error: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). The authorization server MAY return an HTTP 401 (Unauthorized) status code to indicate which HTTP authentication schemes are supported. If the client attempted to authenticate via the "Authorization" request header field, the authorization server MUST respond with an HTTP 401 (Unauthorized) status code and include the "WWW-Authenticate" response header field matching the authentication scheme used by the client. More info: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).]
Daniel_Kinde
Daniel_Kinde6d ago
Hi @Tito, does this issue only occur on iOS builds? Trying to reproduce
Tito
Tito4d ago
both android and ios on simulators using expo development builds i sense it might be related to the callback generated by @kinde/expo, which is simply appscheme://. On the in-app browser, it does show a quick success message after logging in (both via email or social logins) Maybe it has to do with loads/reloads and state of the <KindeAuthProvider> component when it's redirected back? I don't know, I thought firebase auth was difficult in Expo, but in a few hours of fighting I got it to work
Daniel_Kinde
Daniel_Kinde4d ago
Expo and auth is horrid, I give you that. Our SDK is built on Expo tooling. We have this starter kit: https://github.com/kinde-starter-kits/expo-starter-kit/tree/main It does not use the main SDK and manually uses the expo tooling. This will get you moving. Would be good to understand at what point you're getting the errors, and also how you're triggering the expo build. It will help.
GitHub
GitHub - kinde-starter-kits/expo-starter-kit
Contribute to kinde-starter-kits/expo-starter-kit development by creating an account on GitHub.
Tito
Tito2d ago
Thank you. I manage to open the in-app browser and to login with a quick success message in the in-app browser. Then the errors are triggered when the in-app browser closes and it redirects to app. I am using a development build that I build with eas build --platform android ... I did make it work using the expo starter kit. I sense that the problem with the @kinde/expo is that it doesn't define path in
const redirectUri = makeRedirectUri({
native: Constants.isDevice,
path: "/login",
});
const redirectUri = makeRedirectUri({
native: Constants.isDevice,
path: "/login",
});
Maybe by redirecting back to myappscheme:// (instead of myappscheme:///redirect), the app router doesn't trigger the authorization check or similar Also in your code the word domain is used to mean url (i.e. including https://) which is confusing

Did you find this page helpful?