hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
423 stars 51 forks source link

[Question] How to implement Google Sign In with turbo-android #196

Closed kzkn closed 2 years ago

kzkn commented 2 years ago

I'm building a service that has "Google Sign In" with omniauth-google-oauth2 gem. How can I pass the "Google Sign In" with turbo-android?

jayohms commented 2 years ago

Google does not allow sign in through the WebView due to security concerns (since apps can run arbitrary code against 3rd-party domains). So, Google's sign-in form must displayed in a trusted browser, like Chrome. This means you need to kick out to the device browser, then kick back to the app once authenticated, through a custom URI.

This requires a fair amount of knowledge of Android and OAuth, and is out of scope for this library itself. The discussion forum is a good place to discuss this: https://discuss.hotwired.dev/