Captain Pre
CCConvex Community
•Created by Captain Pre on 7/18/2024 in #support-community
How Do You Handle Auth? I am trying to upload user data to the database after Google OAuth.
Alright, Here is the thing.
I have set up JWT Cookie Based auth using Auth Js, I simply want to store the User Data in the Database.
const session = await auth(); // Gives me session.user.name, session.user.email, session.user.image
I have a users.tsx
:
SignIn Page :
as you can see users are redirected to /dashboard
after successful login, Upon which i want to call the createUser() function so the userdata is stored in the database.
Is this a good approach? If not, What is a simple way to make it work. Auth is already way too complicated for me. I dont want to use clerk as i have started to learn auth js and dont want to drop it.33 replies