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(firebase): add option to set custom collection names #10020

Conversation

mathiasj
Copy link
Contributor

☕️ Reasoning

I already had collections in firestore with the names "accounts" and "users" and they could not coincide with the collections created by next-auth. This feature allows the possibility to add a prefix to the collection names created by next-auth.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

None

📌 Resources

Copy link

vercel bot commented Feb 13, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) Oct 2, 2024 8:55pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Oct 2, 2024 8:55pm

Copy link

vercel bot commented Feb 13, 2024

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

A member of the Team first needs to authorize it.

@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters firebase @auth/firebase-adapter labels Feb 13, 2024
Copy link
Member

@ndom91 ndom91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, makes sense. Could you maybe also add a test to confirm that a setup with a prefix works as intended?

Thanks!

@ndom91 ndom91 changed the title feat: allow prefix to collection names to avoid conflicts feat(firebase): add optional prefix to collection names to avoid conflicts May 19, 2024
@balazsorban44 balazsorban44 changed the title feat(firebase): add optional prefix to collection names to avoid conflicts feat(firebase): add option to set custom collection names Oct 2, 2024
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.

Project coverage is 39.12%. Comparing base (56a9564) to head (2beaa48).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/adapter-firebase/src/index.ts 97.56% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10020      +/-   ##
==========================================
+ Coverage   39.09%   39.12%   +0.03%     
==========================================
  Files         189      189              
  Lines       29763    29788      +25     
  Branches     1283     1289       +6     
==========================================
+ Hits        11635    11656      +21     
- Misses      18128    18132       +4     

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

@balazsorban44 balazsorban44 merged commit 78cc61e into nextauthjs:main Oct 2, 2024
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters firebase @auth/firebase-adapter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants