unable to login using kinde on Android apk preview
Hi All, I am using expo and building an app with Kinde as the login interface, but it doesn't let me login to the application after installing the apk on my android device. Is it something related to the Environment in Kinde ? Am i doing something wrong ?
Thanks!
78 Replies
Are you using a Kinde SDK?
Yes I am!
Can you tell me which one and the version please?
Also, what browsere are you using on the device?
And is the log in okay in your local env?
It is working absolutely fine when running in local env
When i click on the login in Android app it opens up in Google chrome
Can you guide me on where I can find the version ?
In the audit log it says this

It keeps rotating but doesn’t go further

Were you expecting to login natively in the app or for the chrome window to open?
We also recommend using the android SDK for Android apps as it supports an in-app sign in experience. See https://docs.kinde.com/developer-tools/sdks/native/android-sdk/
No preference
Hi. We can help more if you share the SDK and version. There have been some recent updates that may be impaciting the issue.
Also, if cookies are blocked in the browser, this will block sign in.
Absolutely!
Is it possible to connect and have a chat related to the issue, if feel that could be much easier
@kinde-oss/react-nativr-sdk-0-7x
Hi
Is there any chance that we can have a deeper look into the issue ? i am kind of stuck with no progress
@everyone can someone help me out here ?
Hi there. Sorry for the late response. Can you please share the device type and model and OS you are using please.
I'll need to pull someone else in to help.
@Yoshify would this be something you are familiar with?
no worries! Samsung Galaxy S24 - Android - Version 14
G'day @yeswolf
Could you share your callback URLs from both the Kinde dashboard and your .env? One I'm most interested in is
KINDE_POST_CALLBACK_URL
Dashboard - exp://192.168.1.107:8081
not sure where i have that ? .env
but this is what i see in my KindeSDK('....',exp://192.168.1.107:8081,'....','exp://192.168.1.107:8081')
Ah, you're providing the configuration manually instead of using a .env - that's fine, disregard that part of my message.
Are you using Expo Go for testing?
yes
And I'll also assume you're using EAS for deployment?
yes yes
it works fine when running on expo go on ios
Sweet, just had to make sure before I gave you the wrong information 🙂
So it doesn't work in Expo Go for Android? Or it does, and it breaks after building with EAS?
i haven't tested the Expo Go for android, i will test that in the next 5mins
If you could that would provide some relevant debugging information 🙂
Referencing the documentation here, when you were building your application with EAS were you updating your Callback URL to the hosted expo URL?
Kinde docs
Expo and React Native SDK
Our developer tools provide everything you need to get started with Kinde.
Note: A callback URL of
exp://192.168.1.107:8081
is only valid during development, after publishing it should look more akin to exp://u.expo.dev/[project-id]?channel-name=channel-name]&runtime-version=[runtime-version]
I'm fairly confident the breakdown is somewhere in the callback given that your authentication attempts succeed and generate an audit entry in Kinde, but the application isn't being updated.Expo Go - Android

But works on iOS
Something ain’t right when using android
"when you were building your application with EAS were you updating your Callback URL to the hosted expo URL" - I am not, keeping it the same
That's interesting. Does the error log give you anything relevant?

Is your Android device definitely on the same network as your computer? It's not attempting to use mobile data etc?
same network
turned off and testing now
Alright - to start the project can you try
npx expo start --tunnel
?same
Same error?
yup
but interestingly - this is what i see - exp://lhm4xdy-askpopuru-8081.exp.direct
different from the exp://192.168........
not sure what's different from the initial run,
looks like it has something to do with 'tunnel'
Unfortunately I'd love to try take this further but I don't have an android device at hand for replication/testing. I just ran around my house looking to no avail 😅
Bear with me, I'm going to see if I can get another team member involved.
wonderful! Thanks! Also, apologies for all the trouble
Don't be sorry, we'll get to the bottom of it!
Thanks!
Knock Knock!
Who's there?
JK - sorry @yeswolf we are still trying to replicate the issue. We hae had some of our devs at a conference. Thanks for your patience.
* Following* I think I am having the same issue
@CB_Kinde can you please look into this issue
Hi @yeswolf yep, it has been escalated to the team. Sorry about the frustration. It has been a hard one to look into and solve.
Thanks and sorry for all the trouble!
Just letting you know I haven't forgotten - I am prompting people every day
Thanks for the push! Appreciate it!
Hey @yeswolf,
Sorry that you are still experiencing this issue.
I can see you are using
@kinde-oss/react-nativr-sdk-0-7x
, what version of the SDK are you using?
Also, did you follow React Native SDK doc or the Expo and React Native SDK doc?
Also, are you able to confirm the following details are correct?:
- Auth works on iOS, doesnt work on Android
- Auth doesnt work on Expo Go (Android) app
What callback URLs do you currently have configured?Kinde docs
React Native SDK
Our developer tools provide everything you need to get started with Kinde.
@Oli - Kinde I did follow this - https://docs.kinde.com/developer-tools/sdks/native/expo-react-native/
Kinde docs
Expo and React Native SDK
Our developer tools provide everything you need to get started with Kinde.
Yup works on iOS(Expo Go) and doesn't work on Android(App and Expo Go)

exp://192.168.1.107:8081
the sdk. - import { KindeSDK } from '@kinde-oss/react-native-sdk-0-7x';
Hey @yeswolf,
Thanks for sharing these details and screenshots.
Are you able to let me know what version of
kinde-oss/react-native-sdk-0-7x
you are using? This will help us reproduce the issue"@kinde-oss/react-native-sdk-0-7x": "^1.3.1" - from package.json
Hey @yeswolf,
After investigating your issue further.
It seems like it would be best for you to use our new
@kinde/expo
SDK.
This SDK is not publically shared yet, since the SDK package is in a sort-of beta state.
To solve your issue, we suggest using the new 0.2.0-0
version of the SDK - see here
Let me know if you have any questions.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.1, last published: 4 months 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.Thanks for the info! The only question i have after goining through the doc is, there is no callback URL, so my assumption is everything is processed through the domain and client ID ?
and that replaces this right ? Also i don't have my current SDK in App but in a different file but referrencing that, i dont think that should be a problem right ?

Hey @yeswolf,
In the README of @Kinde/expo SDK - you can see the following:
The redirection URL is automatically computed using Expo Auth Session makeRedirectUri function. You can find more information about this function here.Does this answer your question?
Expo Documentation
AuthSession
A universal library that provides an API to handle browser-based authentication.
@Oli - Kinde this is a dependency issue can i get any input here

Hey @yeswolf,
Sorry that you are experiencing this issue with the
@Kinde/expo SDK
v2.0.0-0
Unfortunately, my Expo expert team mate will be online from Jan 6 and will be addressing issues on the Expo SDK from then.
Apologies for the inconvenience.@yeswolf - can you please raise a GitHub issue on the @Kinde/expo GitHub repo on the issue you experienced above?
My expert teammate will be running throught the issues on the repo when he returns.
GitHub
GitHub - kinde-oss/expo: Library to integrate Kinde into an Expo pr...
Library to integrate Kinde into an Expo project. Contribute to kinde-oss/expo development by creating an account on GitHub.
I'm also experiencing this same dependency issue, would be great to get this resolved.
Have raised an issue on the @Kinde/expo GitHub repo
I'm on expo 51 so I don't have the dependency issue but I also can't login with Android using kinde/[email protected]. I get 'no discovery document' in the token response.
I will see where this work is at. Thanks for you patience.
Hi @CB_Kinde just wondered if there was any update on this dependency issue? thanks a lot 🙂
I'll nudge the team and get back to you 🙂
I think the latest update that went a few days ago may have fixed it. https://github.com/kinde-oss/expo
GitHub
GitHub - kinde-oss/expo: Library to integrate Kinde into an Expo pr...
Library to integrate Kinde into an Expo project. Contribute to kinde-oss/expo development by creating an account on GitHub.
Here's the release message - https://github.com/kinde-oss/expo/releases/tag/0.2.0
GitHub
Release Release 0.2.0 · kinde-oss/expo
Note: Small breaking change, Kinde settings now need to be passed directly to the provider, see the readme.
deps: loosen react-native peer depenancy (6158883)
fix: prod environment variables (256c...
Let me know if it does or doesn't fix and I'll chase up again.
I just rebuilt our Android app with @kinde/expo": "^0.2.0" instead of 0.2.0-0, and still couldn't login, receiving the same error from the
kinde.login({})
request: "no discovery document".
iOS sim build correctly authenticates, though...native prod tooOkay. Thanks for letting me know.
@3108sp @yeswolf can you please see if the new Expo fixes your dependncy issue?
thanks very much @CB_Kinde yes, that seems to fix my dependency issue 👍
@jamisonsheppard sounds like you have a separate issue to the dependency issue raised here. Would you mind starting a new thread in the Support channel and we can investigate separately. TY
I was initially trying to use the react-native-sdk-0-7 as suggested at https://docs.kinde.com/developer-tools/sdks/native/expo-react-native/ but that fails because it tries to use the keychain (which is not supported on expo).
I then switched to the kinde-oss/expo approach, which fails on android simulator with a
No discovery document
errorKinde docs
Expo and React Native SDK
Our developer tools provide everything you need to get started with Kinde.
I am using
@kinde-oss/[email protected]
on a freshly started new expo app with latest sdk as of this week
I have the same issue, I only tried Android Sim so far, fails with No discovery document
. I would prefer to use @kinde-oss/react-native-sdk-0-7x
but it doesn't work on expo, I believe because it should use expo-storage instead of react native keychain (not supported on expo)
I wasn't able to build for ios, I think due to a mismatch in the version of @expo/config-plugins
required by @kinde-oss/expo
:
I now managed to build an ios simulator version, it fails with the following error:
It shows a quick success message `You are all signed in!" after signing in with email or social logins, but then it triggers the error aboveHello @Tito ,
Thank you for sharing the details. Here's a summary of the steps to resolve the issues:
'No discovery document' Error on Android:
- Double-check Kinde settings (redirect URIs, client IDs).
- Ensure proper network access for the Android simulator (try a physical device).
- Simulators may have network restrictions; testing on a real device could help. More info: https://github.com/expo/expo/issues/9954.
iOS Authentication Failure:
- Verify client credentials in the Kinde dashboard.
- Ensure the authentication method is supported (the @kinde-oss/react-native-sdk-0-7x might not work with Expo due to dependencies like react-native-keychain). More info: https://community.kinde.com/kindeoss-reactnativesdk07x-android-browser-compatibility-issue-g3mlYqMd1sNl.
Dependency Issues with @kinde-oss/expo:
- Ensure correct versions of @expo/config-plugins to avoid compatibility issues.
Next Steps:
- Review Kinde SDK docs for proper setup: https://docs.kinde.com/developer-tools/sdks/native/expo-react-native.
- Check the GitHub repo for related issues or open a new one: https://github.com/kinde-oss/expo.
Feel free to share any logs or further details for more specific help.
GitHub
Issues · expo/expo
An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web. - Issues · expo/expo
Thanks. Is there a working minimal example with actual details (i.e. what should I add to the list of redirect URIs on Kinde?)?
It looks to me that errors in setup are caught when the app opens up the in-app browser. In my case, I can actually login in the in-app browser and receive a success message, but then the problem is when it is redirected back to the app.
Maybe the app doesn't pick up the intents correctly (no information in the expo docs about setting up app.json with android intents and ios equivalent), maybe the component should have some state check before loading the
<KindleAuthProvider>
component, ...
I also tried it on a physical android device, but i have the same error. When the in-app browser closes after successfully loggin in, the app is not in an authorized state, the redirect doesn't work properlyHello @Tito ,
It seems that the issue may be with the redirect handling after the in-app browser closes. Since the app is not entering the authorized state after a successful login, it’s likely that the redirect URI is not properly configured or the app isn’t catching the redirect intents as expected.
- Make sure that your redirect URIs are correctly set in the Kinde Dashboard. This should match the URI scheme you've defined in your app.json.
- Since the redirect isn’t being picked up correctly, ensure that your app.json includes the necessary setup for both Android and iOS. You might need to explicitly define the intentFilters for Android and update the iOS scheme.
For Android, your app.json might look like this:
{ "expo": { "platforms": ["android"], "android": { "package": "com.yourapp", "intentFilters": [ { "action": "VIEW", "data": { "scheme": "your-app-scheme" } } ] }, "ios": { "bundleIdentifier": "com.yourapp", "config": { "appAuth": { "redirectUri": "your-app-scheme://redirect" } } } } }This ensures that Android properly catches the redirect. - It might be helpful to ensure that the component checks for a valid authenticated state before rendering. You can implement a check to see if the user is already logged in, or whether the app should wait for the redirect before attempting to authenticate again. - After making these adjustments, test on a physical device and check the app logs for any error messages related to the redirect handling. Ensure that the authorization flow works smoothly from login through the redirect back to the app. If you're still encountering issues, feel free to share the specific logs or error details and your current setup. I’d be happy to escalate this to our engineering team for a deeper investigation.
On the kinde dashboard I added
my-app-scheme://
but i don't know what my redirect urls should be. Should i add my-app-scheme://redirect
?
Anyway the login page would fail already without the urls added to the dashboard.
My app.json for android already contained:
On the kinde dashboard I added these redirect urls:
I always get the same error No discovery document
I couldn't find any example or discussions about Kinde on Expo anywhere, let me know if you can connect me with anyone actually using thisHi Tito
I’ll pass this to my team and get back to you once I have more information. Please let me know if you encounter any new issues, and I’ll be happy to assist further
I’ll pass this to my team and get back to you once I have more information. Please let me know if you encounter any new issues, and I’ll be happy to assist further
Is there any updates from Kinde? I've followed all the above instructions where applicable and I'm still getting 'no discovery document' on Android. Is there a working example somewhere?
Hi @jamisonsheppard,
We have been working and looking into this. Our starter kit we have which does not use our SDK is working (https://github.com/kinde-starter-kits/expo-starter-kit), our SDK is packaged up version of this yet in most cases the error you're experiencing happens.
We are working directly with Expo team and experts to understand further the cause and hope to have a solution soon. In the mean time please refer to our starter kit. Migration to our SDK will be simple in the future.