From f7deb74aa5612d4d49da4ec179e61124e8fa0763 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 21 Jan 2024 21:38:25 -0700 Subject: * Add the username information to the initial xoauth2 screen that tells users that Alpine needs authorization to open their account. --- alpine/imap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'alpine/imap.c') diff --git a/alpine/imap.c b/alpine/imap.c index 78081fb0..45f2c97e 100644 --- a/alpine/imap.c +++ b/alpine/imap.c @@ -357,7 +357,7 @@ oauth2_elapsed_done(void *aux_valuep) } void -oauth2_set_device_info(OAUTH2_S *oa2, char *method) +oauth2_set_device_info(OAUTH2_S *oa2, char *method, NETMBX *mb) { char tmp[MAILTMPLEN]; char *name = (char *) oa2->name; @@ -386,12 +386,12 @@ oauth2_set_device_info(OAUTH2_S *oa2, char *method) so_puts(in_store, "

"); sprintf(tmp, _("

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

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

Alpine is attempting to log you into your %s account with username %s using the %s method."), name, mb->user, method), so_puts(in_store, tmp); if(deviceinfo->verification_uri && deviceinfo->user_code){ sprintf(tmp, - _("

To sign in, use a web browser to open the page %s and enter the code \"%s\" without the quotes."), + _("

To sign in, use a web browser to open the page %s and enter the code %s."), deviceinfo->verification_uri, deviceinfo->verification_uri, deviceinfo->user_code); so_puts(in_store, tmp); } @@ -470,7 +470,7 @@ try_wantto: 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. "), name, method), + _("Alpine is attempting to log you into your %s account with username %s using the %s method."), name, mb->user, method); tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; if(deviceinfo->verification_uri && deviceinfo->user_code){ @@ -530,7 +530,7 @@ try_wantto: } char * -oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int *tryanother) +oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, NETMBX *mb, int *tryanother) { char tmp[MAILTMPLEN]; char *code = NULL; @@ -551,7 +551,7 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, int * 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 with username %s using the %s method."), oauth2->name, mb->user, method), so_puts(in_store, tmp); if(strucmp((char *) oauth2->name, (char *) GMAIL_NAME) == 0 && strstr(url, (char *) GMAIL_ID) != NULL){ @@ -662,7 +662,7 @@ try_wantto: 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), + _("Alpine is attempting to log you into your %s account with username %s using the %s method."), oauth2->name, mb->user, method); tmp_20k_buf[SIZEOF_20KBUF-1] = '\0'; snprintf(tmp_20k_buf+strlen(tmp_20k_buf), SIZEOF_20KBUF-strlen(tmp_20k_buf), -- cgit v1.2.3-54-g00ecf