This PR adds register functionality to the app. There is also some code refactoring and optimizations.
Implemented
• Register Functionality
• Optimize "prisma.ts". Change ID (which is a field of User, ArchiveUser and PasswordResetToken Tables) type from "BIGINT" to "INT". The reason being that when type is "BIGINT", there is a need to always serialize ID field and convert it into string as PostgresSQL does not work well with "BIGINT".
• Changes in "api/auth/[...nextauth]/route.ts". The current user_id was not passed properly to the current session (Cannot access user_id in app). It is now fixed.
This PR adds register functionality to the app. There is also some code refactoring and optimizations.
Implemented • Register Functionality
• Optimize "prisma.ts". Change ID (which is a field of User, ArchiveUser and PasswordResetToken Tables) type from "BIGINT" to "INT". The reason being that when type is "BIGINT", there is a need to always serialize ID field and convert it into string as PostgresSQL does not work well with "BIGINT".
• Changes in "api/auth/[...nextauth]/route.ts". The current user_id was not passed properly to the current session (Cannot access user_id in app). It is now fixed.
• Add types for bcrypt NPM library.
• Prisma auto-generates random user_id.