K
Kindeβ€’3mo ago
yeswolf

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
CB_Kinde
CB_Kindeβ€’3mo ago
Are you using a Kinde SDK?
yeswolf
yeswolfOPβ€’3mo ago
Yes I am!
CB_Kinde
CB_Kindeβ€’3mo ago
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?
yeswolf
yeswolfOPβ€’3mo ago
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
yeswolf
yeswolfOPβ€’3mo ago
No description
yeswolf
yeswolfOPβ€’3mo ago
It keeps rotating but doesn’t go further
No description
CB_Kinde
CB_Kindeβ€’3mo ago
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/
yeswolf
yeswolfOPβ€’3mo ago
No preference
CB_Kinde
CB_Kindeβ€’3mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
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 ?
CB_Kinde
CB_Kindeβ€’2mo ago
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?
yeswolf
yeswolfOPβ€’2mo ago
no worries! Samsung Galaxy S24 - Android - Version 14
Yoshify
Yoshifyβ€’2mo ago
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
yeswolf
yeswolfOPβ€’2mo ago
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')
Yoshify
Yoshifyβ€’2mo ago
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?
yeswolf
yeswolfOPβ€’2mo ago
yes
Yoshify
Yoshifyβ€’2mo ago
And I'll also assume you're using EAS for deployment?
yeswolf
yeswolfOPβ€’2mo ago
yes yes it works fine when running on expo go on ios
Yoshify
Yoshifyβ€’2mo ago
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?
yeswolf
yeswolfOPβ€’2mo ago
i haven't tested the Expo Go for android, i will test that in the next 5mins
Yoshify
Yoshifyβ€’2mo ago
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.
Yoshify
Yoshifyβ€’2mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
Expo Go - Android
No description
yeswolf
yeswolfOPβ€’2mo ago
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
Yoshify
Yoshifyβ€’2mo ago
That's interesting. Does the error log give you anything relevant?
yeswolf
yeswolfOPβ€’2mo ago
No description
Yoshify
Yoshifyβ€’2mo ago
Is your Android device definitely on the same network as your computer? It's not attempting to use mobile data etc?
yeswolf
yeswolfOPβ€’2mo ago
same network turned off and testing now
Yoshify
Yoshifyβ€’2mo ago
Alright - to start the project can you try npx expo start --tunnel?
yeswolf
yeswolfOPβ€’2mo ago
same
Yoshify
Yoshifyβ€’2mo ago
Same error?
yeswolf
yeswolfOPβ€’2mo ago
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'
Yoshify
Yoshifyβ€’2mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
wonderful! Thanks! Also, apologies for all the trouble
Yoshify
Yoshifyβ€’2mo ago
Don't be sorry, we'll get to the bottom of it!
yeswolf
yeswolfOPβ€’2mo ago
Thanks! Knock Knock!
CB_Kinde
CB_Kindeβ€’2mo ago
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.
ripvanwinkle
ripvanwinkleβ€’2mo ago
* Following* I think I am having the same issue
yeswolf
yeswolfOPβ€’2mo ago
@CB_Kinde can you please look into this issue
CB_Kinde
CB_Kindeβ€’2mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
Thanks and sorry for all the trouble!
CB_Kinde
CB_Kindeβ€’2mo ago
Just letting you know I haven't forgotten - I am prompting people every day
yeswolf
yeswolfOPβ€’2mo ago
Thanks for the push! Appreciate it!
Oli - Kinde
Oli - Kindeβ€’2mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
Kinde docs
Expo and React Native SDK
Our developer tools provide everything you need to get started with Kinde.
yeswolf
yeswolfOPβ€’2mo ago
Yup works on iOS(Expo Go) and doesn't work on Android(App and Expo Go)
yeswolf
yeswolfOPβ€’2mo ago
No description
yeswolf
yeswolfOPβ€’2mo ago
exp://192.168.1.107:8081 the sdk. - import { KindeSDK } from '@kinde-oss/react-native-sdk-0-7x';
Oli - Kinde
Oli - Kindeβ€’2mo ago
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
yeswolf
yeswolfOPβ€’2mo ago
"@kinde-oss/react-native-sdk-0-7x": "^1.3.1" - from package.json
Oli - Kinde
Oli - Kindeβ€’2mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
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 ?
yeswolf
yeswolfOPβ€’2mo ago
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 ?
No description
Oli - Kinde
Oli - Kindeβ€’2mo ago
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.
yeswolf
yeswolfOPβ€’2mo ago
@Oli - Kinde this is a dependency issue can i get any input here
No description
Oli - Kinde
Oli - Kindeβ€’2mo ago
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.
Oli - Kinde
Oli - Kindeβ€’2mo ago
@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.
3108sp
3108spβ€’3w ago
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
jamisonsheppard
jamisonsheppardβ€’3w ago
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.
CB_Kinde
CB_Kindeβ€’3w ago
I will see where this work is at. Thanks for you patience.
3108sp
3108spβ€’2w ago
Hi @CB_Kinde just wondered if there was any update on this dependency issue? thanks a lot πŸ™‚
CB_Kinde
CB_Kindeβ€’2w ago
I'll nudge the team and get back to you πŸ™‚
CB_Kinde
CB_Kindeβ€’2w ago
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.
CB_Kinde
CB_Kindeβ€’2w ago
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...
CB_Kinde
CB_Kindeβ€’2w ago
Let me know if it does or doesn't fix and I'll chase up again.
jamisonsheppard
jamisonsheppardβ€’2w ago
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 too
CB_Kinde
CB_Kindeβ€’2w ago
Okay. Thanks for letting me know. @3108sp @yeswolf can you please see if the new Expo fixes your dependncy issue?
3108sp
3108spβ€’2w ago
thanks very much @CB_Kinde yes, that seems to fix my dependency issue πŸ‘
CB_Kinde
CB_Kindeβ€’2w ago
@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

Did you find this page helpful?