Welcome to the Kinde community

Updated last month

Kinde authentication not working with ionic capacitor android build

At a glance

The community member is having trouble getting Kinde authentication callback working properly in an Android build of their Ionic/Capacitor app, even though it works well when running the app in a web browser. Another community member suggests using Kinde's JavaScript or TypeScript SDKs, which are supported by Ionic. The community members discuss a potential solution of manually handling the auth parameters by capturing them from the URL when Kinde returns from the auth flow, and passing them to the Kinde SDK using the handleRedirectCallback method.

Useful resources

Hi. Does anyone have Kinde working with React using Ionic/Capacitor? I've got everything working well when running the app via a web browser on PC/Mac but when trying to get an Android build running I can't get the Kinde authentication callback working properly.

C
B
4 comments

Hi John. We have had a question about this before and while we don't have an SDK specifically for Ionic, you can use our JavaScript or TypeScript SDKs as Ionic supports both of these. See

https://github.com/kinde-oss/kinde-auth-pkce-js

https://kinde.com/docs/developer-tools/typescript-sdk/

Ley us know if this an option for your situation.


Kinde seems to detect auth query parameters when the page first loads. But in a Capacitor app the page is already loaded when Kinde returns from the auth flow.

So it never detects the state, code, ... params. Is there a way to manually push these through to Kinde? Or make kinde re-detect?

Hi Bram,
You might be able to manually handle the auth parameters by capturing them from the URL when Kinde returns from the auth flow. You can then pass these parameters to the Kinde SDK using the handleRedirectCallback method. This should help you process the state, code, and other params correctly in your Capacitor app.

Let me know if this helps.

Add a reply
Sign up and join the conversation on Slack