-
Notifications
You must be signed in to change notification settings - Fork 91
feat: atproto oauth #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: atproto oauth #273
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| <summary | ||
| class="text-fg-subtle cursor-pointer hover:text-fg-muted transition-colors duration-200" | ||
| > | ||
| What is an Atmosphere account? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we need to figure out a nice way to make account creation very clear, too.
currently if someone doesn't have a bsky account, and has no idea what atproto is, this info doesn't give them much. they need to now dig through the atproto docs and do some googling to find out how to make an account
so we should probably at least mention bsky as an example of how you might have such an account
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good if we want to go ahead use selfhosted.social (it's mine and zeu's and I'm the admin of it) PDS for account creations. You start the OAuth flow to the server with the PDS's url and a create flag. With that the user can sign up for an account on the PDS and be redirected back to npmx authenticated.
This will give users handles ending in .selfhosted.social
I am also good if y'all want me to manage a PDS server with an alternate handle ending for npmx, like npmx.town. atproto oauth doesn't like serving apps if the account logging in shares a domain with the PDS. This is also just more branding if we want them to have that ending in the handle
| :aria-label="ariaLabel" | ||
| @click="showModal = true" | ||
| > | ||
| {{ user?.miniDoc?.handle || 'login' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user itself is a "minidoc", no? so this and the other usages can just be user?.handle?
|
just a couple of minor comments but looks good to me, pretty straightforward! nice work 🎉 |
server/api/auth/session.delete.ts
Outdated
| @@ -0,0 +1,9 @@ | |||
| export default defineEventHandler(async event => { | |||
| const session = await useSession(event, { | |||
| password: process.env.NUXT_SESSION_PASSWORD as string, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create an example .env file that we can commit so people know that they can set NUXT_SESSION_PASSWORD without digging into the code?
There's also runtime config (not sure if that's useful for this case)
Implements AT Protocol OAuth using
@atproto/apiand@atproto/oauth-client-node.WIP: needs better UI for
<AuthModal />.Notes:
NUXT_SESSION_PASSWORDenv variable to encrypt cookies