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
Otherlogins block in login.html #351
base: main
Are you sure you want to change the base?
Conversation
Adding a block in the login template so the users can extend the login template and add the logic to add login buttons for other providers e.g. Google, Microsoft, Auth0, etc.
Other logins block in login.html
for more information, see https://pre-commit.ci
@lukasvinclav @HenrichHanusovsky @gernathlub Can I please get your eyes on this? |
@afsangujarati93 correct me if I'm wrong but this block is not available in default django admin at all, right? From my perspective this feature seems to be quite specific. If you want to add custom button into a form, you can override login.html coming from Unfold. |
@lukasvinclav Yes, my plan is to override the unfold login template, but there's NO empty block in the unfold login template that I can override. The PR adds a block in the unfold login template which I can extend to add my logic. If I have the I also explained in the PR description what is the issue if I simply extend the current unfold login template and add the button. |
and just for context, the only way for me to get the Signin with Google button appear right after the login button is to copy and paste the entire content from the base block like so
However, if I have that
I believe this would make life easier for whoever else is using django all auth in their admin. |
Adding a block in the login template so the users can extend the login template and add the logic to add login buttons for other providers e.g. Google, Microsoft, Auth0, etc.
This is required because if the user tries to extend the login template and add the login option as follows
the button is pushed towards the bottom of the page and there's no clean way to put it right below the current login button. See the screenshot below