workos 0.8.2 → 0.9.0
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/README.md +5 -2
- package/dist/bin.js +23 -13
- package/dist/bin.js.map +1 -1
- package/dist/commands/auth-status.d.ts +1 -0
- package/dist/commands/auth-status.js +56 -0
- package/dist/commands/auth-status.js.map +1 -0
- package/dist/commands/login.js +5 -4
- package/dist/commands/login.js.map +1 -1
- package/dist/doctor/checks/ai-analysis.js +3 -3
- package/dist/doctor/checks/ai-analysis.js.map +1 -1
- package/dist/lib/adapters/cli-adapter.js +1 -1
- package/dist/lib/adapters/cli-adapter.js.map +1 -1
- package/dist/lib/agent-interface.js +5 -5
- package/dist/lib/agent-interface.js.map +1 -1
- package/dist/lib/credential-proxy.js +1 -1
- package/dist/lib/credential-proxy.js.map +1 -1
- package/dist/lib/ensure-auth.js +3 -3
- package/dist/lib/ensure-auth.js.map +1 -1
- package/dist/lib/run-with-core.js +1 -1
- package/dist/lib/run-with-core.js.map +1 -1
- package/dist/lib/token-refresh-client.js +1 -1
- package/dist/lib/token-refresh-client.js.map +1 -1
- package/dist/lib/token-refresh.js +1 -1
- package/dist/lib/token-refresh.js.map +1 -1
- package/dist/lib/version-check.js +2 -1
- package/dist/lib/version-check.js.map +1 -1
- package/dist/utils/exit-codes.js +1 -1
- package/dist/utils/exit-codes.js.map +1 -1
- package/dist/utils/help-json.js +7 -2
- package/dist/utils/help-json.js.map +1 -1
- package/package.json +1 -1
- package/skills/workos-authkit-nextjs/SKILL.md +1 -1
- package/skills/workos-authkit-react/SKILL.md +19 -10
- package/skills/workos-authkit-react-router/SKILL.md +18 -8
- package/skills/workos-authkit-sveltekit/SKILL.md +55 -7
- package/skills/workos-authkit-tanstack-start/SKILL.md +22 -8
- package/skills/workos-authkit-vanilla-js/SKILL.md +19 -10
- package/skills/workos-elixir/SKILL.md +37 -0
- package/skills/workos-go/SKILL.md +36 -1
- package/skills/workos-kotlin/SKILL.md +34 -0
- package/skills/workos-management/SKILL.md +1 -1
- package/skills/workos-node/SKILL.md +33 -0
- package/skills/workos-php/SKILL.md +34 -1
- package/skills/workos-php-laravel/SKILL.md +36 -1
- package/skills/workos-python/SKILL.md +34 -0
- package/skills/workos-ruby/SKILL.md +35 -0
package/README.md
CHANGED
|
@@ -470,10 +470,13 @@ The CLI uses WorkOS Connect OAuth device flow for authentication:
|
|
|
470
470
|
|
|
471
471
|
```bash
|
|
472
472
|
# Login (opens browser for authentication)
|
|
473
|
-
workos login
|
|
473
|
+
workos auth login
|
|
474
|
+
|
|
475
|
+
# Check current auth status
|
|
476
|
+
workos auth status
|
|
474
477
|
|
|
475
478
|
# Logout (clears stored credentials)
|
|
476
|
-
workos logout
|
|
479
|
+
workos auth logout
|
|
477
480
|
```
|
|
478
481
|
|
|
479
482
|
OAuth credentials are stored in the system keychain (with `~/.workos/credentials.json` fallback). Access tokens are not persisted long-term for security - users re-authenticate when tokens expire.
|
package/dist/bin.js
CHANGED
|
@@ -20,7 +20,7 @@ if (!satisfies(process.version, NODE_VERSION_RANGE)) {
|
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
22
|
import { isNonInteractiveEnvironment } from './utils/environment.js';
|
|
23
|
-
import { resolveOutputMode, setOutputMode, outputJson, exitWithError } from './utils/output.js';
|
|
23
|
+
import { resolveOutputMode, setOutputMode, isJsonMode, outputJson, exitWithError } from './utils/output.js';
|
|
24
24
|
import clack from './utils/clack.js';
|
|
25
25
|
import { registerSubcommand } from './utils/register-subcommand.js';
|
|
26
26
|
// Resolve output mode early from raw argv (before yargs parses)
|
|
@@ -163,8 +163,9 @@ const installerOptions = {
|
|
|
163
163
|
type: 'boolean',
|
|
164
164
|
},
|
|
165
165
|
};
|
|
166
|
-
// Check for updates (blocks up to 500ms)
|
|
167
|
-
|
|
166
|
+
// Check for updates (blocks up to 500ms, skip in JSON mode to keep stdout clean)
|
|
167
|
+
if (!isJsonMode())
|
|
168
|
+
await checkForUpdates();
|
|
168
169
|
yargs(rawArgs)
|
|
169
170
|
.env('WORKOS_INSTALLER')
|
|
170
171
|
.option('json', {
|
|
@@ -173,16 +174,25 @@ yargs(rawArgs)
|
|
|
173
174
|
describe: 'Output results as JSON (auto-enabled in non-TTY)',
|
|
174
175
|
global: true,
|
|
175
176
|
})
|
|
176
|
-
.command('
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
.command('auth', 'Manage authentication (login, logout, status)', (yargs) => {
|
|
178
|
+
yargs.options(insecureStorageOption);
|
|
179
|
+
registerSubcommand(yargs, 'login', 'Authenticate with WorkOS via browser-based OAuth', (y) => y, async (argv) => {
|
|
180
|
+
await applyInsecureStorage(argv.insecureStorage);
|
|
181
|
+
const { runLogin } = await import('./commands/login.js');
|
|
182
|
+
await runLogin();
|
|
183
|
+
process.exit(0);
|
|
184
|
+
});
|
|
185
|
+
registerSubcommand(yargs, 'logout', 'Remove stored WorkOS credentials and tokens', (y) => y, async (argv) => {
|
|
186
|
+
await applyInsecureStorage(argv.insecureStorage);
|
|
187
|
+
const { runLogout } = await import('./commands/logout.js');
|
|
188
|
+
await runLogout();
|
|
189
|
+
});
|
|
190
|
+
registerSubcommand(yargs, 'status', 'Show current authentication status', (y) => y, async (argv) => {
|
|
191
|
+
await applyInsecureStorage(argv.insecureStorage);
|
|
192
|
+
const { runAuthStatus } = await import('./commands/auth-status.js');
|
|
193
|
+
await runAuthStatus();
|
|
194
|
+
});
|
|
195
|
+
return yargs.demandCommand(1, 'Please specify an auth subcommand').strict();
|
|
186
196
|
})
|
|
187
197
|
.command('install-skill', 'Install bundled AuthKit skills to coding agents (Claude Code, Codex, Cursor, Goose)', (yargs) => {
|
|
188
198
|
return yargs
|