我目前正在使用Roundcube的1.5版本,并尝试将其配置为与Yahoo邮件服务器配合使用。我已经创建了一个应用程序,还允许从OpenID的电子邮件和配置文件应用程序接口权限。作用域有一个问题,当尝试登录时,它会重定向回一个错误页面,并说:“请从已注册的作用域请求作用域,然后再次提交”。这是Roundcube的当前配置:
// Enable OAuth2 by defining a provider. Use 'generic' here
$config['oauth_provider'] = 'yahoo';
// Provider name to be displayed on the login button
$config['oauth_provider_name'] = 'Yahoo';
// Mandatory: OAuth client ID for your Roundcube installation
$config['oauth_client_id'] = '------';
// Mandatory: OAuth client secret
$config['oauth_client_secret'] = '------';
// Mandatory: URI for OAuth user authentication (redirect)
$config['oauth_auth_uri'] = 'https://api.login.yahoo.com/oauth2/request_auth';
// Mandatory: Endpoint for OAuth authentication requests (server-to-server)
$config['oauth_token_uri'] = 'https://api.login.yahoo.com/oauth2/get_token';
// Optional: Endpoint to query user identity if not provided in auth response
//$config['oauth_identity_uri'] = 'null';
// Optional: disable SSL certificate check on HTTP requests to OAuth server
// See http://docs.guzzlephp.org/en/stable/request-options.html#verify for possible values
$config['oauth_verify_peer'] = true;
// Mandatory: OAuth scopes to request (space-separated string)
$config['oauth_scope'] = 'openid mail-r mail-w sdct-w';
// Optional: additional query parameters to send with login request (hash array)
$config['oauth_auth_parameters'] = ['nonce' => mt_rand(), 'prompt' => 'consent'];
// Optional: array of field names used to resolve the username within the identity information
$config['oauth_identity_fields'] = null;
// Boolean: automatically redirect to OAuth login when opening Roundcube without a valid session
$config['oauth_login_redirect'] = true;以下是应用程序的设置:https://imgur.com/pwtNsvx
错误:
发布于 2021-03-13 01:54:27
您需要首先请求访问受限作用域。一旦获得批准,您需要创建一个应用程序并选择邮件范围(电子邮件范围是为了访问用户的“电子邮件”身份,而不是访问邮箱)。请参阅https://developer.verizonmedia.com/mail
https://stackoverflow.com/questions/66566126
复制相似问题