Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Is there a onRegister handler for NextAuth? - Theo's Typesafe Cult
TTC
Theo's Typesafe Cult
•
3y ago
•
4 replies
Gabriel
Is there a onRegister handler for NextAuth?
Hi folks
, how would you go about creating a onRegister function on NextAuth for new users
?
Their documentation does not have this
, I don
't know why
.
I want to generate some data on DB whenever a new user is logged in for the very first time
Solution
have you looked at the
createUser
createUser
event
?
https://next-auth.js.org/configuration/events#createuser
Events | NextAuth.js
Events are asynchronous functions that do not return a response
, they are useful for audit logs
/ reporting or handling any other side
-effects
.
Jump to solution
Theo's Typesafe Cult
Join
26,564
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How Good is NextAuth Currently for App Router
TTC
Theo's Typesafe Cult / questions
3y ago
NextAuth.
TTC
Theo's Typesafe Cult / questions
3y ago
Is it possible to refresh a nextAuth session?
TTC
Theo's Typesafe Cult / questions
3y ago