imapflow 1.0.176 → 1.0.177

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.177](https://github.com/postalsys/imapflow/compare/v1.0.176...v1.0.177) (2025-01-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **login:** When using slashes in username (indicates an Exchange account or drive account), use LOGIN as the authentication mechanism ([7ac0036](https://github.com/postalsys/imapflow/commit/7ac00369a13ff35ed0b923b44e97ba933eee397c))
9
+
3
10
  ## [1.0.176](https://github.com/postalsys/imapflow/compare/v1.0.175...v1.0.176) (2025-01-15)
4
11
 
5
12
 
package/lib/imap-flow.js CHANGED
@@ -1055,6 +1055,10 @@ class ImapFlow extends EventEmitter {
1055
1055
  this.expectCapabilityUpdate = true;
1056
1056
 
1057
1057
  let loginMethod = (this.options.auth.loginMethod || '').toString().trim().toUpperCase();
1058
+ if (!loginMethod && /\\|\//.test(this.options.auth.user)) {
1059
+ // Special override for MS Exchange when authenticating as some other user or non-email account
1060
+ loginMethod = 'LOGIN';
1061
+ }
1058
1062
 
1059
1063
  if (this.options.auth.accessToken) {
1060
1064
  this.authenticated = await this.run('AUTHENTICATE', this.options.auth.user, { accessToken: this.options.auth.accessToken });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "1.0.176",
3
+ "version": "1.0.177",
4
4
  "description": "IMAP Client for Node",
5
5
  "main": "./lib/imap-flow.js",
6
6
  "scripts": {