Showing an error : passport is not defined while using passport-google-oauth20

I have been working on the backend of the application and right now trying to implement Endpoints for user authentication but I am facing this error.

I am attaching a picture and link to my complete updated code here:
Please have a look.

image

@camperextraordinaire please have a look.

Looking at this briefly, serializeUser and deserializeUser are outside the exported function getting passed passport.


As an aside, you should really use a code formatter.

@lasjorg I have tried by passing them inside a function but it is still throwing an error to me. Plz have a look .

image

Didn’t look, but I would assume you have add passport (require it) to the file that needs it.