A CLI for publishing standard.site documents to ATProto sequoia.pub
standard site lexicon cli publishing

Add OAuth Login #8

merged opened by stevedylan.dev targeting main from feat/oauth
  • Adds a new login command that can be used to login with OAuth instead of App Password
  • Stores credentials and refreshes token as it expires
  • Updated docs to reflect login flow
Labels

None yet.

assignee

None yet.

Participants 1
Referenced by
AT URI
at://did:plc:ia2zdnhjaokf5lazhxrmj6eu/sh.tangled.repo.pull/3mdv75qczng22
+28 -8
Interdiff #0 โ†’ #1
bun.lock

This file has not been changed.

docs/docs/public/icon-dark.png

Failed to calculate interdiff for this file.

docs/docs/public/og.png

Failed to calculate interdiff for this file.

packages/cli/package.json

This file has not been changed.

packages/cli/src/commands/auth.ts

This file has not been changed.

packages/cli/src/commands/init.ts

This file has not been changed.

packages/cli/src/commands/login.ts

This file has not been changed.

packages/cli/src/commands/publish.ts

This file has not been changed.

packages/cli/src/commands/sync.ts

This file has not been changed.

packages/cli/src/index.ts

This file has not been changed.

packages/cli/src/lib/atproto.ts

This file has not been changed.

packages/cli/src/lib/credentials.ts

This file has not been changed.

packages/cli/src/lib/oauth-client.ts

This file has not been changed.

packages/cli/src/lib/oauth-store.ts

This file has not been changed.

packages/cli/src/lib/types.ts

This file has not been changed.

+19 -1
docs/docs/pages/cli-reference.mdx
··· 1 # CLI Reference 2 3 ## `auth` 4 5 ```bash [Terminal] 6 sequoia auth 7 - > Authenticate with your ATProto PDS 8 9 OPTIONS: 10 --logout <str> - Remove credentials for a specific identity (or all if only one exists) [optional] ··· 13 --list - List all stored identities [optional] 14 --help, -h - show help [optional] 15 ``` 16 17 ## `init` 18
··· 1 # CLI Reference 2 3 + ## `login` 4 + 5 + ```bash [Terminal] 6 + sequoia login 7 + > Login with OAuth (browser-based authentication) 8 + 9 + OPTIONS: 10 + --logout <str> - Remove OAuth session for a specific DID [optional] 11 + 12 + FLAGS: 13 + --list - List all stored OAuth sessions [optional] 14 + --help, -h - show help [optional] 15 + ``` 16 + 17 + OAuth is the recommended authentication method as it scopes permissions and refreshes tokens automatically. 18 + 19 ## `auth` 20 21 ```bash [Terminal] 22 sequoia auth 23 + > Authenticate with your ATProto PDS using an app password 24 25 OPTIONS: 26 --logout <str> - Remove credentials for a specific identity (or all if only one exists) [optional] ··· 29 --list - List all stored identities [optional] 30 --help, -h - show help [optional] 31 ``` 32 + 33 + Use this as an alternative to `login` when OAuth isn't available or for CI environments. 34 35 ## `init` 36
+9 -7
docs/docs/pages/quickstart.mdx
··· 31 sequoia 32 ``` 33 34 - ### Authorize 35 - 36 - In order for Sequoia to publish or update records on your PDS, you need to authorize it with your ATProto handle and an app password. 37 38 - :::tip 39 - You can create an app password [here](https://bsky.app/settings/app-passwords) 40 - ::: 41 42 ```bash [Terminal] 43 - sequoia auth 44 ``` 45 46 ### Initialize 47
··· 31 sequoia 32 ``` 33 34 + ### Login 35 36 + In order for Sequoia to publish or update records on your PDS, you need to authenticate with your ATProto account. 37 38 ```bash [Terminal] 39 + sequoia login 40 ``` 41 + 42 + This will open your browser to complete OAuth authentication, and your sessions will refresh automatically as you use the CLI. 43 + 44 + :::tip 45 + Alternatively, you can use `sequoia auth` to authenticate with an [app password](https://bsky.app/settings/app-passwords) instead of OAuth. 46 + ::: 47 48 ### Initialize 49

History

2 rounds 0 comments
sign up or login to add to the discussion
5 commits
expand
feat: initial oauth implementation
chore: cleaned up types
chore: updated icon styles
chore: updated og image
chore: updated docs
1/1 success
expand
expand 0 comments
pull request successfully merged
4 commits
expand
feat: initial oauth implementation
chore: cleaned up types
chore: updated icon styles
chore: updated og image
1/1 success
expand
expand 0 comments