android - Alternative for using webview for oAuth Google without Google Play service incorporation -


we have custom devices run on android os dont have google play services incorporated.
have google login using webview oauth2.0 authentication. , per documentation has been deprected.
read there way https://developers.google.com/identity/sign-in/android/ seems requires gradle incorporation play services.
way use google authentication?
found 2 options below helpful in case?
1. https://firebase.google.com/docs/auth/android/start/
2. https://developers.google.com/api-client-library/java/google-api-java-client/oauth2

which can suitable requirement
please help.
regards,
shraddha

yes, indeed google quite time ago has blocked possibility login it's services via app's internal webview. reason google not trust external app providers, is't aware of security of connection. forces external app providers use google's methods of login it's services.

source: modernizing oauth interactions in native apps better usability , security

indeed have found right methods use google services, however, firebase , google sign in have disadvantage makes them ususable you, namely both need google play services. firebase needs them , google sign-in needs them. there no offical way of using both on devices not having google play services.

there yet way: chrome custom tabs. however, require chrome installed on device. , since long time it uses google play services. moreover, chrome custom tabs have been introduced later chrome has incorporated google play services

however, there's hack. declare app's internal webview's user agent chrome. here the documentation. seen @ bottom of page, remove following strings webview user agent string:

  • version/_x.x_ on kitkat devices
  • wv on lollipop+ devices.

however, not recommend method , kindly encourage stick google policy, if there possibility.

hope explanation enough.

edit: per comment below, goole api java client not need google play services, might option.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -