return IMAP_AUTH_UNAVAIL;
}
+ /* If they did not explicitly request or configure oauth then fail quietly */
+ if (!(method || (C_ImapOauthRefreshCmd && *C_ImapOauthRefreshCmd)))
+ return IMAP_AUTH_UNAVAIL;
+
mutt_message(_("Authenticating (OAUTHBEARER)..."));
/* We get the access token from the imap_oauth_refresh_command */
*/
static enum PopAuthRes pop_auth_oauth(struct PopAccountData *adata, const char *method)
{
+ /* If they did not explicitly request or configure oauth then fail quietly */
+ if (!(method || (C_PopOauthRefreshCmd && *C_PopOauthRefreshCmd)))
+ return POP_A_UNAVAIL;
+
mutt_message(_("Authenticating (OAUTHBEARER)..."));
char *oauthbearer = mutt_account_getoauthbearer(&adata->conn->account);
while (authenticator->authenticate)
{
- ret = authenticator->authenticate(adata, authenticator->method);
+ ret = authenticator->authenticate(adata, NULL);
if (ret == POP_A_SOCKET)
{
switch (pop_connect(adata))
{
case 0:
{
- ret = authenticator->authenticate(adata, authenticator->method);
+ ret = authenticator->authenticate(adata, NULL);
break;
}
case -2: