Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model not working with generators #41

Open
garytryan opened this issue Apr 20, 2016 · 2 comments
Open

Model not working with generators #41

garytryan opened this issue Apr 20, 2016 · 2 comments

Comments

@garytryan
Copy link

using version: 1.0.1

Following the examples exactly, even resorted to just copy/pasting. Doesn't seem to work at all when using generators for the model. Switched to functions, that take a callback and everything is fine.

@lan-nguyen91
Copy link

Correct, if you want to use async/promise base manner using yield/await in generator, you have to run with babel. Migration of the code from 2.x to 3.x mentioned about this in the documentation.
https://github.com/oauthjs/node-oauth2-server/wiki/Migrating-from-2.x-to-3.x

@garytryan
Copy link
Author

Right, got it. Thanks @lan-nguyen91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants