Grafana with github authentication problem

Problem

You are trying to use the github OAuth authentication for having users login to your Grafana but there is an error that redirect_uri must match that is coming from Github.

Solution

Make sure that you add a line with the root_url in your /etc/grafana/grafana.ini file that has the same IP/domain name as your server, and restart the service.

root_url = http://xxxx.xxxx.xxxx.xxxx:3000