question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User.findOrCreate is not a function

See original GitHub issue

** READ THIS FIRST! **

Are you looking for help?

Reminder: The issue tracker is not a support forum.

Issues should only be filed in this project once they are able to be reproduced and confirmed as a flaw in the software or incorrect information in associated documention.

If you are encountering problems integrating this module into your application, please post a question on the discussion forum rather than filing an issue.

Is this a security issue?

Do not open issues that might have security implications. Potential security vulnerabilities should be reported privately to jaredhanson@gmail.com. Once any vulerabilities have been repaired, the details will be disclosed publicly in a responsible manner. This also allows time for coordinating with affected parties in order to mitigate negative consequences.

If neither of the above two scenarios apply to your situation, you should open an issue. Delete this paragraph and the text above, and fill in the information requested below.

Expected behavior

Actual behavior

Steps to reproduce

// Format code using Markdown code blocks

Environment

  • Operating System:
  • Node version:
  • passport version:
  • passport-google-oauth2 version:

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
sharmadeep698commented, Aug 23, 2020

hey , just to make that code working, try adding a npm package which will make findorcreate a proper function to work with. for more

1reaction
colmercommented, Aug 9, 2020

HI @Arunps94, User.findOrCreate must be your own method.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User.findOrCreate is not a function passport-facebook
User.findOrCreate is not a function. I have this code in my passport.js: passport.use(new FacebookStrategy({ clientID : configAuth.
Read more >
findOrCreate is not a function · Issue #152 - GitHub
I using passport-facebook version 2.1.0 function(accessToken, refreshToken, profile, done) { User.findOrCreate({ facebookId: profile.id } ...
Read more >
Model Querying - Finders - Sequelize
Let's assume we have an empty database with a User model which has a username and a job . const [user, created] =...
Read more >
User.findOrCreate is not a function - Bountysource
Coming soon: A brand new website interface for an even better experience!
Read more >
The "register" function in passport-local-mongoose is not ...
Coding example for the question The "register" function in passport-local-mongoose is not working "User.register is not a function"-node.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found