-
What Grafana version and what operating system are you using?
-
What are you trying to achieve?
I want to enable granfana third-party oauthor authentication
-
How are you trying to achieve it?
Here is my configuration
[image]
[auth.generic_oauth]
name = uuap
icon = signin
enabled = true
allow_sign_up = true
client_id = xxxe
client_secret = xxx
scopes = openid
empty_scopes = false
email_attribute_name = email:primary
email_attribute_path =
login_attribute_path =
name_attribute_path =
role_attribute_path =
role_attribute_strict = false
groups_attribute_path =
id_token_attribute_name =
team_ids_attribute_path =
auth_url =xxx/author
token_url = xxx/token
api_url =xxx/userinfo
teams_url =
allowed_domains =
team_ids =
allowed_organizations =
tls_skip_verify_insecure = false
tls_client_cert =
tls_client_key =
tls_client_ca =
use_pkce = false
auth_style =
allow_assign_grafana_admin = false
- What happened?
An error is reported when the third-party login returns a redirect successfully.
INFO [03-16|10:30:40] Request Completed logger=context userId=0 orgId=0 uname= method=GET path=/login/generic_oauth status=302 remote_addr=xxxx time_ms=0 duration=536.168µs size=280 referer=//xx:8781/login handler=/login/:name
DEBUG[03-16|10:30:40] FeatureEnabled logger=token feature=accesscontrol.enforcement enabled=false licenseStatus=NotFound hasLicense=false hasValidLicense=false products=
WARN [03-16|10:30:40] OAuth not enabled logger=context userId=0 orgId=0 uname=
INFO [03-16|10:30:40] Request Completed logger=context userId=0 orgId=0 uname= method=GET path=“/login/generic_oauth&code=mcdullxx&state=cC5sC5wKBRqCtRg_MicKeXWmK8q7-LHMFb535rZVeZw=&primary=xxx” status=302 remote_addr=xxx time_ms=7 duration=7.141739ms size=29 referer=//xx:8781/ handler=/login/
debug log error:OAuth not enabled
-
What did you expect to happen?
I expect to be able to log in -
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
Did you follow any online instructions? If so, what is the URL?