The isAuthenticated() function does not appear on the auto complete in visual studio. If I start to write req. it does not show up in the list of functions. I have tired opening the solution code just in case I did anything wrong and it doesn’t work there either.
The functionality works fine but it is just weird that it doesn’t show up and it makes me think there is something wrong with the code maybe.
What package etc are you using for authentication? If it’s passport, req.isAuthenticated() is a perfectly valid function. VSCode’s autocomplete isn’t perfect all the time, so ultimately if your code works as intended I’d not worry about it
The isAuthenticated() auto completes literally everywhere but in that if statement. It appears if I write it in that function but not in the if statement, it appears outside of that function and it also appears if I create an additional if statement in that same function. It just does not appear in the first if statement in that function and I can’t figure out why.