Ldap lemon + nginx reverse proxy + grafana

I’m trying to configure ouath2 to grafana, my Oauth provider is Lemon Ldap but in front of my grafana I have nginx as proxy reverse and I think the Lemon ldap doesn’t know how to manage the nginx authentication, my config looks like :

nginx.conf

server {
        listen 443 ssl default_server;
        server_name tool.domain.com;
        include snippets/self-signed.conf;
        include snippets/ssl-params.conf;
        client_max_body_size 500M;         
            location ~^/grafana {
                proxy_set_header Host $host;
                rewrite ^/grafana/(.*) /$1 break;
                proxy_pass http://192.168.1.25:3000;
            }

}

grafana.ini

[auth.generic_oauth]
enabled = true
allow_sign_up = true
name = Orange Connect
client_id = grafana client
client_secret = sdffsdfs343lDS4ddfsd
scopes = openid profile email
auth_url = https://auth.tec.company/oauth2/authorize
token_url = https://auth.tec.company/oauth2/token
api_url = https://auth.tec.company/oauth2/userinfo

As a client, I’m accessing the grafana via nginx server "*https://tool.domain.com/grafana*" and if I want to connect on grafana via ouath2 it saying “Bad Url” or the bellow error:

2022/01/18 10:46:45 [error] 12408#0: *4798 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 62.200.51.13, server: v, request: "GET /grafana/login/generic_oauth?code=4fc42bbae8e9e86f2a0cd62173feb3c8&state=eyQwXrY22iHNgBj4L2z6QY9mnt7ffwTjuapACY5tMsQ%3D&session_state=%2BaMXQ0Z3RUeElQQVRGTUNMNVVsTDRHNUdZMWg1dGtVd21SYkU4YXpKRDhhMXlmei94V2t5OUc HTTP/1.1", upstream: "http://192.168.1.25:3000/login/generic_oauth?code=4fc42bbae8e9e86f2a0cd62173feb3c8&state=eyQwXrY22iHNgBj4L2z6QY9mnt7ffwTjuapACY5tMsQ%3D&sessionbGhuUXlvYXVIaG5NRVcvOTRwdFpxanRoUFhGQXhJHpaMXQ0Z3RUeElQQVRGTUNMNVVsTDRHNUdZMWg1dGtVd21SYkU4YXpKRDhhMXlmei94V2t5OUc", host: "tool.domain.com", referrer: "https://tool.domain.com/"

Should I configure on nginx server the client_id and client_secret from the Ldap lemon? I’m not an nginx server expert that’s why I’m looking a little bit help from your side.