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

Authenticator with only social sign in (hide regular sign in fields) #5290

Open
sumuhans opened this issue Jun 3, 2024 · 3 comments
Open
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component feature-request Request a new feature

Comments

@sumuhans
Copy link

sumuhans commented Jun 3, 2024

I cannot find a way to show only a google sign in button without showing anything else.
socialProviders={["google"] makes the google button show up. but I can't see a way to hide any of the other fields(The user name and password fields for regular sign in). Is there a way please? If not I would like to request this feature please.

@github-actions github-actions bot added the pending-triage Issue is pending triage label Jun 3, 2024
@sumuhans sumuhans changed the title Authenticator with only google sign in (hide regular sign in fields) Authenticator with only social sign in (hide regular sign in fields) Jun 3, 2024
@zchenwei zchenwei added Authenticator An issue or a feature-request for an Authenticator UI Component feature-request Request a new feature labels Jun 3, 2024
@zchenwei
Copy link
Contributor

zchenwei commented Jun 3, 2024

Hi @sumuhans, thanks for bringing this up. We currently do not support hiding the sign in fields but if you have every reason to do that, you can use CSS to hide them.

@zchenwei zchenwei removed the pending-triage Issue is pending triage label Jun 3, 2024
@sumuhans
Copy link
Author

sumuhans commented Jun 4, 2024

Hi @sumuhans, thanks for bringing this up. We currently do not support hiding the sign in fields but if you have every reason to do that, you can use CSS to hide them.

Thanks so much for the prompt response @zchenwei it is very kind of you. Please can you add some details or a simple example showing how CSS could be used to hide everything expect the google sign in button?

@onhate
Copy link

onhate commented Sep 3, 2024

[data-amplify-authenticator] [data-amplify-router] fieldset {
    display: none;
}
[data-amplify-authenticator] .amplify-divider {
    display: none;
}
[data-amplify-authenticator] form div:not(.federated-sign-in-container) button {
    display: none;
}
[data-amplify-authenticator] form + [data-amplify-footer] {
    display: none;
}

this should do the trick, but a flag to the would be waaaaay better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

4 participants
@onhate @sumuhans @zchenwei and others