Skip to content

Migrate User Auth from Firestore to Prisma - #5

Draft
google-labs-jules[bot] wants to merge 4 commits into
mainfrom
fix-auth-db-crash-12042322062532378891
Draft

Migrate User Auth from Firestore to Prisma#5
google-labs-jules[bot] wants to merge 4 commits into
mainfrom
fix-auth-db-crash-12042322062532378891

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

Replaced Firestore with Prisma for User Auth to fix production crashes.


PR created automatically by Jules for task 12042322062532378891 started by @Rukafuu

This change migrates the user authentication and storage layer from Firestore
to PostgreSQL (via Prisma). This resolves critical production errors where
missing Google Cloud credentials caused the backend to crash during login
and recovery flows.

Changes:
- Replaced `user_store.js` implementation with SQL-based logic.
- Removed unused global `refreshTokens` map to fix memory leak.
- Sanitized `mapUser` output to prevent leaking `googleRefreshToken`.
- Verified `gamificationStore.js` and other stores are compatible.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Jan 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
lira-os Ready Ready Preview, Comment Jan 22, 2026 5:15pm

This change migrates the user authentication and storage layer from Firestore
to PostgreSQL (via Prisma). This resolves critical production errors where
missing Google Cloud credentials caused the backend to crash during login
and recovery flows.

Changes:
- Replaced `user_store.js` implementation with SQL-based logic.
- Removed unused global `refreshTokens` map to fix memory leak.
- Sanitized `mapUser` output to prevent leaking `googleRefreshToken`.
- Verified `gamificationStore.js` and other stores are compatible.
This commit finalizes the migration of the user store to PostgreSQL via Prisma,
resolving the production crash caused by missing Firestore credentials.

- Replaced user_store.js with SQL implementation.
- Fixed memory leak in refresh tokens.
- Secured user object mapping.
Direct push to main to trigger Railway deployment.
Resolves production crash due to missing Google Credentials.

- Replaced user_store.js with Prisma implementation.
- Added gameProfiles.json.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants