Social Key auth redirect issue google https

Hi,
Im really new to this and got stuck on the social logon thing.

I use https, Bitnami on GCP for my Erpnext installation. I think I have the latest update.

Im trying to enable the the social auth with Google.

When I use https within the redirect url I got this:

When changing to http I can select a google account. But after a while the page times out. I guess the create a new account should be showing.
Could some one guide me to find a solution to make google login work
BR
Johan

Update redirect uri on Google console, it needs to be https there.

Try setting host_name key in site_config.json, example "host_name": "https://abc.de:8000"

Almost there,
I have added “host_name” and that work,
Now I got another issue. The consent screen shows and I can select my google account.


But when I select my account Google tries to connect but times out.
This is whats times out
https://portal.abc.de:8000/api/method/frappe.www.login.login_via_google?state=eyJzaXRlIjogImh0dHBzOi8vcG9ydGFsLnN5ZWxsZW4uc2U6ODAwMCIsICJ0b2tlbiI6ICIyZjg5NTQ4ZGIwNmYxYjQ4NDhmMzBhMjYyYjg1ZDQ0MWRhMGU1NjhiMDk0MDk3ODA5MDQ1ZDA2OCIsICJyZWRpcmVjdF90byI6IG51bGx9&code=4/0AY0e-g7TDMmC8MjrAoG5sRHMMxgErisQ5ramze8TBF7dgw1uvUJoGwc92IPXwf4Cc9r7fQ&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.profile%20https://www.googleapis.com/auth/userinfo.email%20openid&authuser=2&hd=syellen.se&prompt=consent

It works to create a local account without any problem.
BR
Johan

Try removing port from host_name just use “https://portal.abc.de” instead of “https://portal.abc.de:8000”

I added 443 to “http_port” in site_config.json and now it is working!!
The solution was to add the following to site_config.json

“host_name”: “https://abc.de”,
“http_port”: “443”,

Thanks a lot
BR
Johan

1 Like

For version 15 enusre that you also add the following to site_config.json especially if you are using docker on a vps.

“restart_supervisor_on_update”: true,
“restart_systemd_on_update”: true,