aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 245 forks source link

Show only social sign in using Authenticator #3456

Open sowens-csd opened 1 year ago

sowens-csd commented 1 year ago

I'm using Cognito for social authentication but don't want to allow the user to create their own account. They should instead use one of the configured social authentication services. I haven't been able to find a way to configure it to disable the Cognito authentication and display just the social login buttons. I know I could recreate the buttons but before I did that I wanted to check if I was missing something obvious.

Equartey commented 1 year ago

Hey @sowens-csd,

Can you provide more context of your environment?

Are you using our Authenticator project?

sowens-csd commented 1 year ago

Yes. I have a working Flutter app using the Authenticator widget from:

import 'package:amplify_authenticator/amplify_authenticator.dart';

That successfully displays the login form and if I select one of the social buttons the login is successful. I'd like to be able to customize the displayed form to only display the social login buttons, or have access to those buttons so I could use them on my own form.

Equartey commented 1 year ago

Hey @sowens-csd,

While we do offer methods to override the login form, reference to example. I'm not seeing an easy way to implement a view using only social sign in buttons.

This seems to be a shortcoming with the types we are exposing under the hood. I'll continue to investigate and for now will mark this as a feature request.

sowens-csd commented 1 year ago

Sounds good, thanks for following up. I'll implement that myself then, just wanted to make sure I wasn't missing the easy way. Would you like to leave this open to track the feature request?

Equartey commented 1 year ago

Let's leave it open to track interest.

In the meantime, the Authenticator package might be overkill if your use case is strictly Social login. If you're recreating the social buttons yourself, I would also consider removing the authenticator as a dependency.

minerasoft commented 9 months ago

Hello, any updates on this? It would be very convenient to have the option to enable only social auth in the SignInForm. Or an alternate way to support the same requirement. Thanks

Equartey commented 9 months ago

Hi @minerasoft,

No updates at the moment, but it's good to see more interest on this issue. We will continue to monitor and update this issue as we have updates. Thanks

aouicher commented 8 months ago

Hi @Equartey it could be great to be able to have only social provider(s). Thank you

dropik commented 1 week ago

+1 for this feature request. The thing is that it's not just about buttons. But it's much more about keeping access/refresh tokens, and delegating all the auth flow logic to Amplify without reimplementing it by yourself. So that would be really great to see an easy option to disable standard login mechanism. Thank you.