when Im sending my email and password the "generateAccessAndRefereshTokens" fn catching error that "Something went wrong while generating access and refresh token" .
when I console log the "user" its working but when I consolelog the "refreshToken" the fn goes to catch block
I think something is wrong with "generateAccessToken" and "generateRefreshToken" methods defined in user.model file
when Im sending my email and password the "generateAccessAndRefereshTokens" fn catching error that "Something went wrong while generating access and refresh token" . when I console log the "user" its working but when I consolelog the "refreshToken" the fn goes to catch block I think something is wrong with "generateAccessToken" and "generateRefreshToken" methods defined in user.model file
const generateAccessAndRefereshTokens = async(userId) =>{ try { const user = await User.findById(userId) const accessToken = await user.generateAccessToken() const refreshToken = await user.generateRefreshToken()
}