OAuth: Fix misleading warn log related to oauth and increase logged content (#57336)
* only emit warn log when sync is not skipped. Fix warn log that had wrong recommendation * log presence of refresh token
This commit is contained in:
@@ -195,10 +195,15 @@ func (hs *HTTPServer) OAuthLogin(ctx *models.ReqContext) {
|
||||
token.TokenType = "Bearer"
|
||||
|
||||
if hs.Cfg.Env != setting.Dev {
|
||||
oauthLogger.Debug("OAuthLogin: got token", "expiry", fmt.Sprintf("%v", token.Expiry))
|
||||
oauthLogger.Debug("OAuthLogin: got token",
|
||||
"expiry", fmt.Sprintf("%v", token.Expiry),
|
||||
"type", token.TokenType,
|
||||
"has_refresh_token", token.RefreshToken != "",
|
||||
)
|
||||
} else {
|
||||
oauthLogger.Debug("OAuthLogin: got token",
|
||||
"expiry", fmt.Sprintf("%v", token.Expiry),
|
||||
"type", token.TokenType,
|
||||
"access_token", fmt.Sprintf("%v", token.AccessToken),
|
||||
"refresh_token", fmt.Sprintf("%v", token.RefreshToken),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user