You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: options/locale/locale_en-US.ini
+1
Original file line number
Diff line number
Diff line change
@@ -436,6 +436,7 @@ oauth_signin_submit = Link Account
436
436
oauth.signin.error = There was an error processing the authorization request. If this error persists, please contact the site administrator.
437
437
oauth.signin.error.access_denied = The authorization request was denied.
438
438
oauth.signin.error.temporarily_unavailable = Authorization failed because the authentication server is temporarily unavailable. Please try again later.
439
+
oauth_callback_unable_auto_reg = Auto Registration is enabled, but OAuth2 Provider %[1]s returned missing fields: %[2]s, unable to create an account automatically, please create or link to an account, or contact the site administrator.
439
440
openid_connect_submit = Connect
440
441
openid_connect_title = Connect to an existing account
441
442
openid_connect_desc = The chosen OpenID URI is unknown. Associate it with a new account here.
return"", fmt.Errorf("preferred_username is missing in received user data but configured as username source for user_id %q. Check if OPENID_CONNECT_SCOPES contains profile", gothUser.UserID)
392
+
ifpreferredUsername, ok:=gothUser.RawData["preferred_username"].(string); ok {
log.Error("You may need to change the 'OPENID_CONNECT_SCOPES' setting to request all required fields")
968
+
log.Error(`OAuth2 auto registration (ENABLE_AUTO_REGISTRATION) is enabled but OAuth2 provider %q doesn't return required fields: %s. `+
969
+
`Suggest to: disable auto registration, or make OPENID_CONNECT_SCOPES (for OpenIDConnect) / Authentication Source Scopes (for Admin panel) to request all required fields.`,
// The RawData is the only way to pass the missing fields to the another page at the moment, other ways all have various problems:
972
+
// by session or cookie: difficult to clean or reset; by URL: could be injected with uncontrollable content; by ctx.Flash: the link_account page is a mess ...
973
+
// Since the RawData is for the provider's data, so we need to use our own prefix here to avoid conflict.
974
+
ifgothUser.RawData==nil {
975
+
gothUser.RawData=make(map[string]any)
962
976
}
963
-
err=fmt.Errorf("OAuth2 Provider %s returned empty or missing fields: %s", authSource.Name, missingFields)
0 commit comments