Skip to content
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

feat: add @auth/astro framework library with example & docs #6463

Closed
wants to merge 33 commits into from

Conversation

TheOtterlord
Copy link

NOTE:

  • It's a good idea to open an issue first to discuss potential changes.
  • Please make sure that you are NOT opening a PR to fix a potential security vulnerability. Instead, please follow the Security guidelines to disclose the issue to us confidentially.

☕️ Reasoning

Supersedes #6425

🚀 Introduces an Astro framework package, with documentation & an example. The package exposes Astro components in addition to the methods.

Thanks to @tajkirkpatrick and @nowaythatworked who've helped out with building, debugging & documenting this package.

I've deployed the included example application to https://auth-astro-example.vercel.app/ feel free to take a look.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

TheOtterlord and others added 28 commits January 16, 2023 13:39
First draft rewrite. Still missing a few instructions such as, node version disclaimer, polyfill disclaimer, setting up the astro.config.mjs in server mode (and accompanying adapter), rewording the callback URL explanation, and explaining the authOptions object that needs to be created by the end user as well as what actions to take when changing the prefix from the default "/api/auth" prefix.
fix: Addtl docs and source fix
@TheOtterlord
Copy link
Author

Only a day late 😅

This latest change turns the package into an Astro integration and removes a large portion of the installation process, as well as remove some annoying bugs & DX decisions. I've also updated the documentation to rely on a components.d.ts file removing any definitions outside the package.

@tony-sull
Copy link

Just came across this PR when looking into adding Astro support to Auth.js, great work here!

@TheOtterlord let me know if I can help at all! It'd be amazing to see @auth/astro support for an easy auth solution in SSR!

The idea of routing this through Astro's integrations API is really interesting to avoid boilerplate - I wonder if there's something we can do to make it easier to access environment variables when configuring auth providers without reaching for Vite's loadEnv helper 🤔

@nowaythatworked
Copy link

@tony-sull We are actually developing this further on this repo https://github.com/nowaythatworked/auth-astro and merge the results in here periodically. Feel free to PR or join the Discussion on the Astro Discord

@ChrisSki
Copy link

Any update on this? Waiting for this bad boy so I can get Auth working with Astro 🙏

@Dezaku
Copy link

Dezaku commented Jul 19, 2023

Any update on this? Waiting for this bad boy so I can get Auth working with Astro 🙏

Same!

@TheOtterlord
Copy link
Author

The current version of this PR is behind auth-astro, but if there's still interest, I'd be happy to update it when I get the time!

@AsyncBanana
Copy link

AsyncBanana commented Jul 28, 2023

I have fixed some things (monorepo functionality, weird edge bugs, consistent formatting) and added some stuff (defineConfig helper) in my fork, if you want to take some or all of it. I have submitted some changes as PRs already, and would be happy to submit other changes or the whole thing as a PR.

@martincolladodev
Copy link

Any update on this? Waiting for this bad boy so I can get Auth working with Astro 🙏

Same!

@Dezaku
Copy link

Dezaku commented Aug 11, 2023

We need an update asap!!

@Ayfri
Copy link

Ayfri commented Oct 4, 2023

Any update ?

@brunocascio
Copy link

Really looking for this to be merged <3

@nathandaly
Copy link

I'm using this for commercial purposes but let's get this officially supported. Astro is huge.

@DarioPanada
Copy link

Hello, any updates on this? :)

@Gradlon
Copy link

Gradlon commented Dec 10, 2023

Would be really could to get this merged!

@podbasico
Copy link

Hello, any update on this PR?

@blainehill2001
Copy link

+1 for Astro with Auth!!

@ndom91
Copy link
Member

ndom91 commented Dec 29, 2023

@TheOtterlord can you take a look at the merge conflicts? Thanks!

@Dezaku
Copy link

Dezaku commented Jan 22, 2024

any news? Hopefully not ded

@TheOtterlord
Copy link
Author

TheOtterlord commented Jan 30, 2024

@ndom91 this PR fell behind both auth-astro and this repo, so I've re-implemented using the latest version of @auth/core and the docs in a new PR: #9856

Hope to continue the conversation over there! Excited to pick this up again! (and while everyone is waiting, auth-astro is the unofficial astro package to try in the meantime!)

CGarces added a commit to CGarces/auth-astro that referenced this pull request Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.