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(framework): add nuxt framework client #10684

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

peterbud
Copy link

@peterbud peterbud commented Apr 22, 2024

☕️ Reasoning

This PR is aiming to add support for Nuxt framework to @AuthJS

🧢 Checklist

  • Add SetEnvDefaults to be consistent with other frameworks
  • Discuss CSRF vs Origin checking approach
  • Optional: Add NuxtDevTools support
  • Documentation: TBD
  • Tests: TBD
  • Ready to be merged

🎫 Affected issues

N/A

Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 2:14pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Nov 6, 2024 2:14pm

@ndom91
Copy link
Member

ndom91 commented Apr 22, 2024

Followup Todos for us:

  • Add example repo (nextauthjs/nuxt-example-app)
  • Ensure Balazs github token can write to that (for sync)
  • Double check example code sync to that new repo
  • Add nuxt example app Vercel project (with shared env vars)
  • Add nuxt.authjs.dev subdomain

package.json Outdated Show resolved Hide resolved
@orenmizr
Copy link

orenmizr commented May 7, 2024

is it possible to build it and use it as alpha until the production version released ? @peterbud

@peterbud
Copy link
Author

is it possible to build it and use it as alpha until the production version released ? @peterbud

I think we are pretty early in the process of creating this framework, I'd love to have a proper review from the AuthJS core members before suggesting to use this.

Copy link

vercel bot commented May 24, 2024

@peterbud is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

socket-security bot commented Jun 23, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@ndom91
Copy link
Member

ndom91 commented Nov 3, 2024

Follow up for us once this is merged:

  • Add nuxt.authjs.dev subdomain in Vercel dashboard (redirect already in this PR)
  • Add example app
    • Create repository nextauthjs/nuxt-auth-example
    • Add new repo to .github/sync.yml
    • Create new Vercel project syncing from new nextauthjs/nuxt-auth-example repo
    • Link pre-existing account env vars (esp shared AUTH_SECRET for proxying)
    • Ensure the apps/examples/nuxt dir is syncing to nextauthjs/nuxt-auth-example correctly (Balazs often has to add the new repo to his PAT for the sync to work, otherwise permissions errors)
    • Add example app link to docs homepage (?)
  • Tweet about it 🥳 (?)

Anything I've missed?

@moshetanzer
Copy link

moshetanzer commented Nov 3, 2024

@ndom91
Removing NUXT_ from beginning of env vars will not let them be replaced in nuxt config in runtime properly.

@peterbud
Copy link
Author

peterbud commented Nov 3, 2024

@ndom91 Removing NUXT_ from beginning of env vars will not let them be replaced in nuxt config in runtime properly.

Yes, without the NUXT_ prefix they won't be read from the .env file and at runtime they won't be even considered.

@ndom91
Copy link
Member

ndom91 commented Nov 3, 2024

Okay gotcha, I'll revert that then. Unfortunately the auto-detect env vars from @auth/core wont work then without additional changes there, but that's okay for now imo

Copy link

socket-security bot commented Nov 5, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@aws-sdk/client-dynamodb@3.658.1 Transitive: environment, filesystem, shell +28 3.7 MB aws-sdk-bot
npm/@aws-sdk/lib-dynamodb@3.658.1 None +1 264 kB amzn-oss, aws-sdk-bot, kuhe, ...2 more
npm/@builder.io/qwik-city@1.9.0 eval, network +1 2.59 MB shairez
npm/@builder.io/qwik@1.9.0 eval 0 47.6 MB shairez
npm/@cloudflare/workers-types@4.20240925.0 None 0 4.29 MB wrangler-publisher
npm/@eslint/compat@1.1.1 None 0 47.7 kB eslintbot
npm/@eslint/js@9.11.1 None 0 14.2 kB eslintbot, openjsfoundation
npm/@graphql-codegen/cli@5.0.2 environment, filesystem, network, shell, unsafe +59 15.2 MB dotansimha
npm/@graphql-codegen/client-preset@4.3.3 Transitive: environment, eval, filesystem, shell, unsafe +43 15.7 MB dotansimha
npm/@graphql-typed-document-node/core@3.2.0 None 0 2.96 kB dotansimha
npm/@inkeep/widgets@0.2.289 Transitive: environment, filesystem, network, shell, unsafe +28 22.2 MB sarah-inkeep
npm/@mikro-orm/core@5.9.8 environment, eval, filesystem, unsafe 0 889 kB b4nan
npm/@mikro-orm/sqlite@5.9.8 filesystem +1 354 kB b4nan
npm/@miniflare/d1@2.14.2 filesystem, unsafe Transitive: environment, eval, network, shell +5 460 kB wrangler-publisher
npm/@next/third-parties@14.2.16 None 0 14.2 kB matt.straka, rauchg, timer, ...2 more
npm/@nuxt/kit@3.13.2 None 0 147 kB danielroe
npm/@nuxt/module-builder@0.8.4 None 0 20.3 kB danielroe
npm/@nuxt/schema@3.13.2 None 0 580 kB danielroe
npm/@playwright/test@1.40.0 None 0 25.3 kB dgozman-ms
npm/@preact/preset-vite@2.9.1 Transitive: environment, filesystem, unsafe +37 12 MB marvinhagemeister
npm/@prettier/plugin-pug@3.1.0 environment 0 355 kB shinigami92
npm/@prisma/client@5.20.0 environment, filesystem, shell 0 9.16 MB prismabot
npm/@prisma/extension-accelerate@1.1.0 None 0 62.8 kB prismabot
npm/@radix-ui/react-accordion@1.2.1 None +13 321 kB chancestrickland
npm/@radix-ui/react-tabs@1.1.1 None +13 303 kB chancestrickland
npm/vite@5.4.8 None 0 3.26 MB antfu, patak, soda, ...2 more

🚮 Removed packages: npm/@auth/solid-start@0.13.0, npm/@aws-sdk/client-dynamodb@3.499.0, npm/@aws-sdk/lib-dynamodb@3.499.0, npm/@cloudflare/workers-types@4.20240117.0, npm/@solidjs/meta@0.28.7, npm/@solidjs/router@0.6.0, npm/autoprefixer@10.4.20, npm/postcss@8.4.44, npm/solid-js@1.8.22, npm/solid-start-node@0.2.32, npm/solid-start-vercel@0.2.32, npm/solid-start@0.2.32, npm/tailwindcss@3.4.10, npm/typescript@5.2.2, npm/vite@3.2.10, npm/vite@5.3.1, npm/zod@3.23.8

View full report↗︎

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.17%. Comparing base (a1cf406) to head (227440a).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10684       +/-   ##
===========================================
+ Coverage   39.15%   77.17%   +38.02%     
===========================================
  Files         191      114       -77     
  Lines       29988     2936    -27052     
  Branches     1291      385      -906     
===========================================
- Hits        11742     2266     -9476     
+ Misses      18246      670    -17576     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orenmizr
Copy link

orenmizr commented Nov 6, 2024

i noticed next-auth changed in v5. will this be v5 compatible ? will this be offical nuxt or community ?

kudos @peterbud for sticking with it all this time.

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.

8 participants