I am trying to login using google auth
The problem is that the return url is with http:// and not https://
The redirect URI in the request, http://luahsport.co.il/auth/google/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient
I tried to define it like this
config :gym_portal,
GymPortalWeb.Endpoint,
http: [
:inet6,
port: 4000
],
url: [
host: "luahsport.co.il",
port: 443,
scheme: "https"
],
cache_static_manifest: "priv/static/cache_manifest.json"
or like this
force_ssl: [rewrite_on: [:x_forwarded_proto], host: nil]
Nada!
I am using Nginx with Letsencript
my nginx conf is
upstream sport {
server localhost:4000 max_fails=5 fail_timeout=60s;
}
server {
server_name luahsport.co.il;
location / {
allow all;
# Proxy Headers
proxy_hide_header X-Frame-Options;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Cluster-Client-Ip $remote_addr;
# The Important Websocket Bits!
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#root /home/eli/sport/priv/static;
#proxy_redirect off;
proxy_pass http://sport;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/luahsport.co.il/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/luahsport.co.il/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}