Link grafana login to my API



I am trying to link the login here to my own api so my clients can use there credentials from my website to login to grafana I have read the docs here:

I see I can use oAuth but I will have to redirect them to another page.
What I am trying to do is login directly using the username and password of grafana as shown in the screenshot.

Thanks alot.