If you store your user in postgresql, you could interact with your database with raw SQL queries or use an ORM to manage the interaction for you. I'd suggest putting all your database access behind a common interface so that if you swap to using a different database later on you don't have issues.
Basically, just make a db module with an exported function called "findUser" and in there you can implement the method by retrieving the user from the database using your ORM/raw SQL. Then import this db module where you want to call your passport auth and then call the function "findUser" that you have written.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you store your user in postgresql, you could interact with your database with raw SQL queries or use an ORM to manage the interaction for you. I'd suggest putting all your database access behind a common interface so that if you swap to using a different database later on you don't have issues.
Basically, just make a db module with an exported function called "findUser" and in there you can implement the method by retrieving the user from the database using your ORM/raw SQL. Then import this db module where you want to call your passport auth and then call the function "findUser" that you have written.