clavarium 0.2.81-next.1 → 0.2.82-next.1

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.81-next.1",
3
+ "version": "0.2.82-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.81-next.1",
9
+ "version": "0.2.82-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.81-next.1",
3
+ "version": "0.2.82-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
@@ -28,13 +28,13 @@ import { consentUrl, exchangeCode, extractCode, thunderbird, scopeFor, pkcePair,
28
28
  /* The loopback the provider sends the code back to; nothing listens there. The
29
29
  person's browser lands on a page that will not load, and they copy the whole
30
30
  address -- which carries the code -- back into Clavarium. The same address
31
- trades the code, so it only has to stay constant. Google's desktop client
32
- accepts any 127.0.0.1 port; Microsoft (Azure) rejects a 127.0.0.1 whose exact
33
- port is not registered but accepts http://localhost with ANY port for a public
34
- client, so Microsoft uses localhost. */
31
+ trades the code, so it must match what the borrowed client registered. Google's
32
+ desktop client takes any 127.0.0.1 port. Microsoft's (GNOME Online Accounts')
33
+ registered one exact redirect, a custom scheme goa-oauth2://localhost/<id>, so
34
+ that is the one to send: after allowing, the browser shows that goa-oauth2://
35
+ address (it cannot open it -- that is expected) and the person copies it. */
35
36
  const REDIRECT = 'http://127.0.0.1:47813/';
36
- const REDIRECT_LOCALHOST = 'http://localhost:47813/';
37
- const redirectFor = (provider) => (provider === 'microsoft' ? REDIRECT_LOCALHOST : REDIRECT);
37
+ const redirectFor = (provider) => (provider === 'microsoft' ? `goa-oauth2://localhost/${thunderbird('microsoft').clientId}` : REDIRECT);
38
38
  const PENDING_MS = 10 * 60_000;
39
39
  const PENDING_MAX = 20;
40
40
 
package/web/app.js CHANGED
@@ -6193,7 +6193,7 @@
6193
6193
  const all = kinds.includes('calendar') && kinds.includes('contacts');
6194
6194
  $('connexion-notice').textContent = provider === 'google'
6195
6195
  ? `Clavarium signs in with GNOME Online Accounts' app — that is what Google sees.${all ? ' Mail, calendar and contacts can be connected together.' : ''}`
6196
- : `Clavarium signs in with GNOME Online Accounts' app — that is what Microsoft sees.${all ? ' Mail, calendar and contacts together, over Microsoft Graph.' : ''}`;
6196
+ : `Clavarium signs in with GNOME Online Accounts' app — that is what Microsoft sees.${all ? ' Mail, calendar and contacts together, over Microsoft Graph.' : ''} After you allow, the browser shows a goa-oauth2://… address it cannot open — copy that one and paste it below.`;
6197
6197
  $('connexion-open').textContent = `Open the ${who} sign-in page`;
6198
6198
  };
6199
6199
  for (const b of $('connexion-provider').querySelectorAll('button')) b.addEventListener('click', () => setConnexionProvider(b.dataset.provider));
package/web/index.html CHANGED
@@ -548,7 +548,7 @@
548
548
  <div class="row"><button type="button" id="connexion-open" class="primary">Open the sign-in page</button></div>
549
549
  <div id="connexion-paste" hidden>
550
550
  <label for="connexion-code">After you allow, the page will not load — copy its full address and paste it here</label>
551
- <div class="row"><input id="connexion-code" spellcheck="false" autocapitalize="off" placeholder="http://localhost... or http://127.0.0.1..."><button type="button" id="connexion-connect" class="primary">Connect</button></div>
551
+ <div class="row"><input id="connexion-code" spellcheck="false" autocapitalize="off" placeholder="Paste the whole address from the bar"><button type="button" id="connexion-connect" class="primary">Connect</button></div>
552
552
  </div>
553
553
  <p id="connexion-error" class="error" role="alert" hidden></p>
554
554
  </form>