diff options
-rw-r--r-- | alpine/imap.c | 43 | ||||
-rw-r--r-- | alpine/init.c | 1 | ||||
-rw-r--r-- | alpine/init.h | 2 | ||||
-rw-r--r-- | pith/pine.hlp | 7 |
4 files changed, 50 insertions, 3 deletions
diff --git a/alpine/imap.c b/alpine/imap.c index a001980c..6c14bc4d 100644 --- a/alpine/imap.c +++ b/alpine/imap.c @@ -40,6 +40,7 @@ static char rcsid[] = "$Id: imap.c 1266 2009-07-14 18:39:12Z hubert@u.washington #include "busy.h" #include "titlebar.h" #include "xoauth2.h" +#include "init.h" #include "../pith/state.h" #include "../pith/conf.h" #include "../pith/msgno.h" @@ -302,6 +303,48 @@ oauth2_get_access_code(char *url, char *method, OAUTH2_S *oauth2, int *tryanothe * If screen hasn't been initialized yet, use want_to. */ try_wantto: + tmp_20k_buf[0] = '\0'; + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + _("Auhtorizing Alpine Access to %s Email Services\n\n"), oauth2->name); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + _("Alpine is attempting to log you into your %s account, using the %s method."), oauth2->name, method), + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s\n\n",_(" In order to do that, Alpine needs to open the following URL:")); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s\n\n", url); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + _("Copy and paste the previous URL into a web browser that supports javascript, to take you to %s's servers to complete this process.\n\n"), oauth2->name); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s", _("After you open the previous link, you will be asked to authenticate and later to authorize access to Alpine.")); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s", _(" At the end of this process, you will be given an access code or redirected to a web page.\n")); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s", _(" If you see a code, copy it and then press 'C', and enter the code at the prompt.")); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s", _(" 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. ")); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), + "%s", _(" Once you have completed this process, Alpine will proceed with authentication.\n")); + tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; + + display_init_err(tmp_20k_buf, 0); memset((void *)tmp, 0, sizeof(tmp)); strncpy(tmp, _("Alpine would like to get authorization to access your email: "), sizeof(tmp)); tmp[sizeof(tmp)-1] = '\0'; diff --git a/alpine/init.c b/alpine/init.c index 563897b5..cd1c0256 100644 --- a/alpine/init.c +++ b/alpine/init.c @@ -46,7 +46,6 @@ CONF_TXT_T init_md_create[] = "Creating subdirectory \"%s\" where Alpine will st /* * Internal prototypes */ -void display_init_err(char *, int); char *context_string(char *); int prune_folders(CONTEXT_S *, char *, int, char *, unsigned); int prune_move_folder(char *, char *, CONTEXT_S *); diff --git a/alpine/init.h b/alpine/init.h index 24f42e4c..8d8f098d 100644 --- a/alpine/init.h +++ b/alpine/init.h @@ -21,7 +21,7 @@ /* exported prototypes */ int init_mail_dir(struct pine *); int expire_sent_mail(void); - +void display_init_err(char *, int); #endif /* PINE_INIT_INCLUDED */ diff --git a/pith/pine.hlp b/pith/pine.hlp index 1f0af384..867cc2b4 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 415 2020-03-26 01:13:59 +Alpine Commit 416 2020-04-01 00:08:26 ============= h_news ================= <HTML> <HEAD> @@ -220,6 +220,11 @@ Bugs that have been addressed include: <LI> Crash in Alpine while resizing the screen when using any of the tokens SUBJKEYTEXT, SUBJECTTEXT, or SUBJKEYINITTEXT in the index format, and the screen was resized. Reported by Iggy Mogo. + +<LI> When Alpine is trying to authenticate to Gmail, using the XOAUTH2 method, + it does not display the url the user needs to open, in order to authorize + Alpine to access Gmail using XOAUTH2 when Alpine still has not created + a screen. Reported by Baron Fujimoto. </UL> <P> |