SShortSingh.
Back to feed

Auth.js Database Schema Explained: Four Core Tables and How They Work

0
·3 views

Auth.js, formerly known as NextAuth, automatically creates four database tables when integrated into a project: users, accounts, sessions, and verification_tokens. The users and accounts tables share a one-to-one relationship, while a single user can be linked to multiple OAuth providers such as Google or GitHub. Sessions are generated on every sign-in and tied to individual users, supporting multiple simultaneous sessions across different devices. Verification tokens are short-lived, used for tasks like email verification, and are deleted automatically once expired. Developers can safely extend the users table with custom columns, as Auth.js ignores fields it does not recognize.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Interactive map traces Los Angeles construction history from 1880 to 2026

A new interactive web tool allows users to visualize the development of Los Angeles building by building, spanning nearly 150 years from 1880 to 2026. The project, hosted at lax-skyline.parcelscope.net, presents the city's urban growth in a chronological, data-driven format. It was shared on Hacker News, where it garnered 24 points and sparked community discussion. The tool draws on parcel-level data to illustrate how the city's skyline and neighborhoods have expanded over time. It offers a unique perspective on urban development for researchers, historians, and curious residents alike.

0
ProgrammingDEV Community ·

OpenAI Logs 3.1 Agent-Workdays Per Human Workday, But Research Speed Lags Behind

OpenAI published an internal report on September 6, 2026, revealing that its research organization was running 3.1 agent-workdays of AI runtime for every single human workday by mid-August. Researchers were contributing code faster and conducting more experiments, with AI agents also taking over troubleshooting tasks that previously required support office hours. However, OpenAI cautioned that increased code output and experiment volume do not automatically translate into proportionally faster research progress. The report notes that research involves many interdependent stages — including decision-making, analysis, and safety review — and accelerating one stage often shifts the bottleneck elsewhere. The key takeaway for developers and freelancers is to identify which stage is actually limiting finished output, rather than simply maximizing AI usage.

0
ProgrammingDEV Community ·

Developer Ditches Job Hunt to Spend a Year Building His Own Projects

A Bangladeshi software developer recently left his remote Unity job and completed a large freelance contract covering web, mobile, GPS, and real-time tracking features, only to find the client expected ongoing new development under a flat maintenance fee. Frustrated by an unsustainable arrangement and a discouraging experience on Upwork — where applications often go unanswered and each bid costs money — he began reconsidering his approach to work. Realizing he had savings of over 250,000 BDT and a solid skill set, he decided to stop waiting for someone to hire him and instead dedicate the next 12 months to building his own projects. His self-directed plan involves creating tools, open-source projects, games, and developer utilities without pressure to monetize every idea. One early output is DevJS, a Node.js utility that consolidates multiple development processes — such as backend, frontend, and Flutter — into a single terminal interface.

0
ProgrammingDEV Community ·

Solo Dev Ditches Discord and Google Drive for Zero-Cost Google Sites Portal

A solo developer shares how relying on a pinned Discord channel and shared Google Drive folder to distribute builds to playtesters quickly became unmanageable as their project grew toward a public release. Discord proved effective for small alpha groups but created onboarding friction, lacked discoverability, and felt unprofessional as a public-facing hub. After testing several distribution options including OneDrive and self-hosted SSH servers, the developer settled on the Google Drive API for file delivery due to its reliability and easy access control. With the distribution pipeline already tied to Google's ecosystem, Google Sites emerged as the logical zero-cost alternative to SaaS website builders that typically charge $15–$30 per month. However, the developer soon encountered limitations when attempting custom HTML embeds, as Google Sites sandboxes all third-party code inside restricted iframes.