← back to George Gmail
george /auth honors ?account= — dispatches to per-account re-auth routes
ec801aa8bf70fc59216480d06d3d282929492864 · 2026-05-18 13:11:38 -0700 · Steve Abrams
Files touched
Diff
commit ec801aa8bf70fc59216480d06d3d282929492864
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon May 18 13:11:38 2026 -0700
george /auth honors ?account= — dispatches to per-account re-auth routes
---
server.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/server.js b/server.js
index 39b4a2d..6dba3af 100644
--- a/server.js
+++ b/server.js
@@ -242,6 +242,17 @@ app.use(express.static(path.join(__dirname, 'public')));
const OAUTH_REDIRECT = 'http://localhost:9850/oauth2callback';
app.get('/auth', (req, res) => {
+ // Honor ?account= — dispatch to the matching dedicated re-auth route so
+ // each account gets its own oauth client, scopes, login_hint, and state.
+ // Keys match resolveAccount(): steve-office (default), info, steve-personal, stevesclaude.
+ const acct = (req.query.account || 'steve-office').toLowerCase();
+ const routes = {
+ 'info': '/auth/info',
+ 'steve-personal': '/auth/steve-personal',
+ 'stevesclaude': '/auth/stevesclaude',
+ };
+ if (routes[acct]) return res.redirect(routes[acct]);
+ // steve-office (default, or unknown account key) — full Workspace re-auth for steve@
if (!oauth2Client) return res.status(500).send('OAuth client not configured');
const url = oauth2Client.generateAuthUrl({
access_type: 'offline',
← a4d0448 fix(george): ENV_PATH portable across Mac2/Kamatera
·
back to George Gmail
·
Add agentabrams (theagentabrams@gmail.com) as 5th george acc 23979b0 →