From f8b7cb749156312136d40005841b3a80e01dcb30 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 9 Jul 2020 14:04:09 -0600 Subject: * A few improvements to the XOAUTH2 code. Mainly documentation for users. --- alpine/imap.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/alpine/imap.c b/alpine/imap.c index bf5f9aea..51f8bdc6 100644 --- a/alpine/imap.c +++ b/alpine/imap.c @@ -174,7 +174,7 @@ OAUTH2_S alpine_oauth2_list[] = 0, /* first time indicator */ 1 /* client secret required */ }, - {"Outlook", + {OUTLOOK_NAME, {"outlook.office365.com", "smtp.office365.com", NULL, NULL}, {{"client_id", NULL}, {"client_secret", NULL}, /* not used, but needed */ @@ -203,7 +203,7 @@ OAUTH2_S alpine_oauth2_list[] = 0, /* first time indicator */ 0 /* client secret required */ }, - {"Outlook", + {OUTLOOK_NAME, {"outlook.office365.com", "smtp.office365.com", NULL, NULL}, {{"client_id", NULL}, {"client_secret", NULL}, /* not used, but needed */ @@ -232,7 +232,7 @@ OAUTH2_S alpine_oauth2_list[] = 0, /* first time indicator */ 1 /* client secret required */ }, - {"Yandex", + {YANDEX_NAME, {"imap.yandex.com", "smtp.yandex.com", NULL, NULL}, {{"client_id", NULL}, {"client_secret", NULL}, /* not used, but needed */ @@ -620,19 +620,19 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int * !(out_store = so_get(CharStar, NULL, EDIT_ACCESS))) goto try_wantto; - so_puts(in_store, "

"); + so_puts(in_store, "

"); sprintf(tmp, _("

Authorizing Alpine Access to %s Email Services
"), oauth2->name); so_puts(in_store, tmp); - sprintf(tmp, _("

Alpine is attempting to log you into your %s account, using the %s method."), oauth2->name, method), + sprintf(tmp, _("

Alpine is attempting to log you into your %s account, using the %s method."), oauth2->name, method), so_puts(in_store, tmp); - if(strucmp(oauth2->name, "Gmail") == 0){ - so_puts(in_store, _(" If this is your first time setting up this type of authentication and you have a G-Suite account, please follow the steps below. ")); - so_puts(in_store, _("

First you must register Alpine with Google and create a client-id and client-secret. The steps below explain how to do this. If you already did that, then you can skip to the second part to continue with the setup process.")); + if(strucmp(oauth2->name, GMAIL_NAME) == 0){ + so_puts(in_store, _(" If this is your first time setting up this type of authentication, please follow the steps below. ")); + so_puts(in_store, _("

First you must register Alpine with Google and create a client-id and client-secret. If you already did that, then you can skip to the authorization step, and continue with the process outlined below.")); so_puts(in_store, _("

")); so_puts(in_store, _("

As a result of this process, you will get a client-id and a client-secret.")); @@ -642,7 +642,7 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int * so_puts(in_store, _("

If you completed these steps successfully, you are ready to move to the second part, where you will authorize Gmail to give access to Alpine to access your email.")); } - so_puts(in_store, _("

In order to authorize Alpine to access your email, Alpine needs to open the following URL:")); + so_puts(in_store, _("

In order to authorize Alpine to access your email, Alpine needs to open the following URL:")); so_puts(in_store,"

"); sprintf(tmp_20k_buf, _("%s"), url, url); so_puts(in_store, tmp_20k_buf); @@ -658,7 +658,7 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int * so_puts(in_store, _(" If you do not see a code, copy the url of the page you were redirected to and again press 'C' and copy and paste it into the prompt. ")); so_puts(in_store, _(" Once you have completed this process, Alpine will proceed with authentication.")); so_puts(in_store, _(" If you do not wish to proceed, cancel by pressing 'E' to exit")); - so_puts(in_store, _("

")); + so_puts(in_store, _("

")); so_seek(in_store, 0L, 0); init_handles(&handles); -- cgit v1.2.3-54-g00ecf