Hi Ory Community, I'm working on a native Android...
# ory-selfhosting
f
Hi Ory Community, I'm working on a native Android app built with Flutter, and I'm integrating user authentication using Google Sign-In via the
google_sign_in
Flutter package. This uses Android's native Google login capabilities, which keeps the user inside the app (ideal UX). For identity management, I'm using ORY Kratos to handle registration and login flows via its API. My current understanding of the flow is: • The user signs in with Google using the native google_sign_in package. • I receive an ID token on the device. • I then call my backend to verify the token, and from there, either register or log the user in via Kratos (likely using the admin API). What I Want to Achieve • I want to avoid building a full custom backend flow to handle Google sign-in, token verification, and Kratos user management. • Ideally, I’d like to leverage Kratos's built-in OIDC capabilities to handle this. • I want to enable account linking, meaning users can sign up with email/password and later link their Google account (or vice versa). • I want to keep Kratos as the source of truth for identity, without duplicating identity logic outside it. My Question Is there a supported or recommended way to use Kratos's OIDC provider logic in this native scenario — where I already have an ID token from Google on the device — without writing a custom backend that manually verifies the ID token and uses Kratos’s admin API? Or is a custom backend component currently the only way to bridge native Google Sign-In with Kratos? Thanks in advance for any insights or suggestions on best practices for this setup! edit: Ok, missed this: https://www.ory.sh/docs/kratos/social-signin/google#using-the-google-sdk-on-native-apps