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!
69 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