Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bottom sheet ui for google auth on android #45

Open
yakovyarmo opened this issue Nov 1, 2024 · 24 comments
Open

Bottom sheet ui for google auth on android #45

yakovyarmo opened this issue Nov 1, 2024 · 24 comments

Comments

@yakovyarmo
Copy link

How can we show the new ui for goole auth on android?

@WcaleNieWolny
Copy link
Contributor

Bottom sheet ui

You cannot. I assume that this is the UI that you are talking about:
image

You CANNOT show show this "new UI" with this plugin. This is a deliberate choice and not a design oversight.
This "new UI" is closer to Google's One Tap API. Currently, one tap is not supported on any platform.

@yakovyarmo
Copy link
Author

Regarding the new UI implementation request:

I understand this was a deliberate design choice, but I believe there's value in reconsidering:

Benefits

  • 🚀 Better UX: Matches modern auth patterns users expect
  • 🛠️ Developer Flexibility: Optional feature for those who need it
  • 🔄 Industry Alignment: Keeps plugin competitive with alternatives

Suggestion

Could we consider adding this as an optional UI variant? This would:

  • Maintain backward compatibility
  • Give developers choice
  • Not interfere with core functionality

I'm willing to help with implementation/documentation if you're open to discussing this approach.

What are your thoughts on exploring this as a configurable option?

@WcaleNieWolny
Copy link
Contributor

I am more than happy to welcome a PR, but only if this "one tap" api works across all platforms (iOS, web, Android)

I know that it's possible to do one tap on the web and on Android, but I am not sure about iOS

@yakovyarmo
Copy link
Author

yakovyarmo commented Nov 3, 2024 via email

@riderx
Copy link
Contributor

riderx commented Nov 8, 2024

Can you link the doc of this new modal?
We currently implement on Android the last recomended sdk

@yakovyarmo
Copy link
Author

Can you link the doc of this new modal? We currently implement on Android the last recomended sdk

Doc for what? for the one tap?

https://developer.android.com/identity/sign-in/credential-manager-siwg

To trigger Google One Tap flow, use GetGoogleIdOption instead of GetSignInWithGoogleOption

@riderx
Copy link
Contributor

riderx commented Nov 28, 2024

@yakovyarmo have you tried the plugin?
That for me what we use

@riderx
Copy link
Contributor

riderx commented Nov 28, 2024

ok no you where right, i added newUI in option of login put it to true to test the new UI

@WcaleNieWolny
Copy link
Contributor

@riderx one of my first commits back when this plugin was in its infancy was nuking one-tap from Android. Unfortunately,
one-tap poses many challenges that made in undesirable to use it as the main method of loging in.

By far the biggest issue that I faced back then was the requirement of using the device's system accounts. If the user is not logged in, this one-tap API will not allow him or her to add a new Google account.

It was also inconsistent with iOS and the web.

I am of the firm belief that providing an option for this new UI is in the best interests of the users as long as it is not default option

@riderx
Copy link
Contributor

riderx commented Nov 28, 2024

with an option i agree it good.
i realized my integration was broken, if you can have a look and add it back behind newUI flag it would be best

@yakovyarmo
Copy link
Author

Can I offer just to add an option to the google login?

const res = await SocialLogin.login({
  provider: 'google',
  options: {
    scopes: ['email', 'profile'],
    style: 'oneTap'
  },
});

or just a new provider?

const res = await SocialLogin.login({
  provider: 'google-oneTap',
  options: {
    scopes: ['email', 'profile']
  },
});

@WcaleNieWolny
Copy link
Contributor

@riderx I just remembered why I nuked the one-tap API. It's incredibly annoying to use, and frankly I struggle to get it to work

@WcaleNieWolny
Copy link
Contributor

This darn API is nothing but pain. It's almost impossible to get past the androidx.credentials.exceptions.NoCredentialException: No credentials available error

@riderx
Copy link
Contributor

riderx commented Nov 29, 2024

You don’t need to handle every caee if there is a demo showing the base the comunity can improve it

@yakovyarmo
Copy link
Author

May be you want me to help with it?
Do you have something I can test?

@WcaleNieWolny
Copy link
Contributor

Sure, here are the changes: #75

@yakovyarmo
Copy link
Author

It worked on my android device (if I remove the comments)

@yakovyarmo
Copy link
Author

I made some changes to the file,
How can I push it for your review ?

@riderx
Copy link
Contributor

riderx commented Dec 4, 2024

yes please

@yakovyarmo
Copy link
Author

But I have no permission to push

@riderx
Copy link
Contributor

riderx commented Dec 5, 2024

fork and do a PR

@yakovyarmo
Copy link
Author

Just did.
Whats's next?

@WcaleNieWolny
Copy link
Contributor

WcaleNieWolny commented Dec 8, 2024

You wait. Merging anything into main is blocked for the next couple of days because I am porting development into main

@yakovyarmo
Copy link
Author

Hi, what is the status for the merge?
Can I help in any way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants