Auth_url - generic_oauth

Hello,

I am trying to link grafana login to my API. I am using generic_oauth.
Due to lack of documentation on the subject I would need some guidance on how to do the auth_url part.
I did the token_url and api_url and I am trying to figure out what is needed from me for the auth_url.
I already have a website where my users can go to login and I would like to I tried putting the login page as the auth_url but nothing is happening.

The docs for the generic_oauth:

Any help on how to configure the auth_url would be much appreciated.

There is no need for OAuth documentation. OAuth is a standard protocol, which has own documentation, RFC (you already have that Oauth token_url - #2 by jangaraj - each endpoint has documented request/response in the RFC).

I guess you have wrong expectation - OAuth is not for “I have my own API so I would use it as OAuth in the Grafana”, but it is for “I have OAuth compliant Identity provider server/service, so I use it as OAuth in the Grafana”. Apparently you don’t have OAuth service, so that is a reason why you have a problem.

Do you know what can I do if I have my own API and want my clients to login to Grafana using their credentials? Is there a way in Grafana to do that? Thank you for your help.

Integrate your “API” with standard IDP (e. g. Keycloak) then you can use standard SSO protocols (SAML, Open ID Connect). You will have solution, which will work with all apps, which support those SSO protocols (Grafana included). Don’t use any legacy API, but prefer well known industry standards.

1 Like

I downloaded keycloak and successfully connected it to grafana. I created a test user on keycloak and was able to login on grafana after doing the essential modifications in the .ini file. However I can’t see how to integrate my API I can only create users manually or import users in the user federation tab on Keycloak. Am I missing something? Can you guide me a bit on what to do please. Thank you.

You are on the Grafana forum, so question how to configure Keycloak is off topic here.

Doc is your friend: Server Developer Guide