Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #127 from GammaMicrowave/main
Browse files Browse the repository at this point in the history
fixed google auth
  • Loading branch information
BuddyLongLegs committed May 24, 2023
2 parents b290ca3 + ceee2bf commit 632ab68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function authGoogle(req, res) {
audience: process.env.GOOGLE_OAUTH_CLIENT_ID,
});
const { name, email } = ticket.getPayload();
const checkUser = await User.exists({ email });
const checkUser = await User.findOne({ email });
if (checkUser) {
const jwtToken = getJwt({ id: checkUser._id, email: email });
return response_200(res, 'Log In Succesful', {
Expand Down

0 comments on commit 632ab68

Please sign in to comment.