Oauth2 Google integration


I am current trying the Oauth2 plugin with an authentication on Google.
When configured I can see that on the login page, I have the choice between Google auth and the basic form authentication. I would like to know if there is any way to have only the google authentication listed?

Also I tried to add some Javascript to the login page so the google auth is automatically selected, but my customization is replaced after each update of the plugin. Is there any way to have that kind of customization survive an update? Maybe I should do it somewhere else than the login.html.twig file?

Hello Remi,

I don’t know about your first question, but to make changes in an update-safe way you should always copy the template you’re modifying to your own theme folder (keeping the folder structure intact). The templates in your own theme take precedence over those provided by Grav or by a plugin.

So in your case, just copy user/plugins/login/templates/login.html.twig to user/themes/YOURTHEME/templates/login.html.twig, and you should be good to go!

I don’t think there should be a /login part

You are RIGHT I’m correcting this :sweat_smile: