frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.88k stars 7.34k forks source link

`Social Login`'s `Authorized redirect URIs` are using `http` instead of `https` and other errors #39705

Open maovidal opened 9 months ago

maovidal commented 9 months ago

Information about bug

The guide at: https://docs.erpnext.com/docs/user/manual/en/google_settings#how-to-set-up-google-settings indicates the Authorized JavaScript origins to set at API & Services > Credentials in Google.

However, ae least for the Social Login, ERPNext is using: http://*redacted*/api/method/frappe.integrations.oauth2_logins.login_via_google. This error is informed by Google when requesting the error detail at the popup that follows the expected user login.

Note the http instead https in the origin, and that this string is not o the documentation. Using temporally http works.

There is also other malformed strings, like the one sent by the contacts integration.

Module

integrations

Version

ERPNext: v15.11.1 Frappe Framework: v15.12.0

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

No response

kholidraf commented 9 months ago

thank you for reporting the bug. Today I just tried to fresh-install the bench and erpnext,. I did integrate the google contact and the problem still occurred. So it seem to be a bug for V15.

I've put this bug here too: https://discuss.frappe.io/t/google-drive-calendar-integration-works-but-contact-failed/116434

ealecho commented 9 months ago

facing the same issue

ealecho commented 9 months ago

facing the same issue

So i was able to resolve the issue by adding the following to my site-config.json

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

and if you use docker like me, add the following nearer the start of your init.sh bench --site {{site-name}} set-config restart_supervisor_on_update 1 bench --site {{site-name}} set-config restart_systemd_on_update 1

Thanks, @revant. This post was helpful. https://discuss.frappe.io/t/frappe-docker-2023-production-setup-password-reset-email-link-added-with-port-8000/101844/9

kholidraf commented 9 months ago

facing the same issue

So i was able to resolve the issue by adding the following to my site-config.json

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

and if you use docker like me, add the following nearer the start of your init.sh bench --site {{site-name}} set-config restart_supervisor_on_update 1 bench --site {{site-name}} set-config restart_systemd_on_update 1

Thanks, @revant. This post was helpful. https://discuss.frappe.io/t/frappe-docker-2023-production-setup-password-reset-email-link-added-with-port-8000/101844/9

Thanks for the hints.

I didn't use docker for running bench. Is it ok to edit init.sh directly?

ealecho commented 9 months ago

I edited the init.sh file directly and it worked

notz commented 6 months ago

The same issue happens with official kubernetes helm chart.

Setting the host_name variable helps.

bench --site {{site-name}} set-config host_name https://{{site-name}}

notz commented 6 months ago

The problem is in frappe docker image, because it doesn't work with upfront SSL termination (ingress controller). See: https://github.com/frappe/frappe_docker/issues/1381