i have site https://fm.xxxxx.com domain was register
and i use some load-balancer as nginx with redirect configuration for keycloak
server {
listen 80;
listen [::]:80;
server_name fm.xxxxx.com;
return 301 https://fm.xxxxx.com;
}
server {
listen 443 ssl;
server_name fm.xxxxx.com;
ssl_certificate /etc/nginx/certificate/xxxxx.crt;
ssl_certificate_key /etc/nginx/certificate/xxxxx.key;
location /realms/fm-users/ {
proxy_read_timeout 90;
proxy_pass http://fm-keycloak:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Scheme $scheme;
client_max_body_size 30m;
}
location /resources/ {
proxy_read_timeout 90;
proxy_pass http://fm-keycloak:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Scheme $scheme;
client_max_body_size 30m;
}...
when i try to setup google identity provider in keycloak i created google provider, and use Redirect URI in google configuration
but google doesnt like URI
i cant change redirect uri in keycloak identity provider and it is invalid for google
i tried use domain instead ip
but it send error when i try login use google
Error 400: redirect_uri_mismatch ofcourse
my site use https, keycloak not
how can i change redirect URI in identity provider in keycloak?
or what can i do?
i tried add redirectUri parameter to keycloak import.json file and add redirectUri parameter to identity_provider_config table in keycloak DB it doesnt help
when i used 127.0.0.1 and run all locally its works but i need it for prod and use domain in keycloak or ip in google
maybe i need to create some redirect using nginx.conf?
I just needed to copy the redirect uri from the error to the url google credential.
The port was redundant.