[auth.generic_oauth]
;---------------------------------------------
enabled = true
name = Discord
allow_sign_up = true
client_id =
client_secret =
scopes = identify guilds email
;empty_scopes = false
auth_url = Discord
token_url = https://discord.com/api/oauth2/token
api_url = https://discord.com/api/users/@me
teams_url = https://discord.com/api/users/@me/guilds
team_ids_attribute_path = [*].id
team_ids = ; GUILD-ID for the discord server
use_pkce = true ;CHATGPT MODIFICATION
login_attribute_path = email ;CHATGPT MODIFICATION
id_token_attribute_name = id ;CHATGPT MODIFICATION
name_attribute_path = username ;CHATGPT MODIFICATION
email_attribute_path = email ;CHATGPT MODIFICATION
-
What are you trying to achieve?
I am trying to allow only members of my discord server (and later people with specific roles on my discord server) to be able to log into my grafana instance. -
How are you trying to achieve it?
By utilizing Discord 0auth2 -
What happened?
For new users it creates and logs in perfectly well, but if the user logs out and attempts to log back in using the Discord 0auth method again, it returns an error “Login failed User sync failed” -
What did you expect to happen?
If the user exists it just logs in -
Can you copy/paste the configuration(s) that you are having problems with?
As above -
Did you receive any errors in the Grafana UI or in related logs? UI returns an error “Login failed User sync failed” at the login screen
-
Did you follow any online instructions? If so, what is the URL?
There are no instructions on the internet on how to do this, the fact i got it generating the account is nothing short of a miracle.