Integrating Grafana with Amazon AWS Cognito error - redirect mistmatch


I am having a mismatch with my Grafana <-> Cognito integration as well and I can’t put my finger on where the issue is.

I configured Grafana to work with https on - a public IP:
protocol: https

My Grafana.ini configuration for [server]:

protocol = https
;The ip address to bind to, empty will bind to all interfaces

; The http port to use
;http_port = 3000

; The public facing domain name used to access grafana from a browser
domain =
; Redirect to correct domain if host header does not match domain
; Prevents DNS rebinding attacks
;enforce_domain = false

; The full public facing url you use in browser, used for redirects and emails
; If you use reverse proxy and sub path specify full url (with sub path)
root_url =
; Serve Grafana from subpath specific in root_url setting. By default it is set to false for compatibility reasons.
serve_from_sub_path = true

; Log web requests
;router_logging = false

; the path relative working path
;static_root_path = public

; enable gzip
;enable_gzip = false

; https certs & key file
cert_file = /etc/grafana/grafana.crt
cert_key = /etc/grafana/grafana.key
;cert_file =
;cert_key =
; Unix socket path
;socket =

;CDN Url
;cdn_url =

My Grafana.ini configuration for [auth.generic_oauth]
enabled = true
name = Midway authentication
client_id = 5vfbd3cr6mml8plqsed37nnecp
client_secret = <Some_Secret>
allow_sign_up = true
scopes = email profile aws.cognito.signin.user.admin openid
auth_url = <cognito_domain>
token_url = <cognito_domain>
api_url = <cognito_domain>

My Cognito configuration:
(Starts with https… the site is not letting me to add it in the beggining)
Callback URL(s)

Sign out URL(s)

The error:
{“error”:“Invalid redirect endpoint”,“traceId”:“I220607154133267DUBQROYCZXXPHL3”}

Can someone please assist?

Thanks in advance,

Bar Elhanati