Login api or sso kind of thing

Hi I have two site one in php and other is grafana. Users are same in both sites as i am using api of grafana to create user from php site.

Now what i want once i will login in php site at that time with same credential it should be login in grafana also.

So any api through which i will pass parameter to get login in grafana? If not then plz guide me if there is any other approach through which i will do SSO for both the sites.