-
Notifications
You must be signed in to change notification settings - Fork 192
Conversation
Hi, |
@FennNaten help 😸 |
^^ Just look at my latest commit on pr #121 ;) if you copy/pasted version.js as I did for private.js base, your next() call is not in the right place. You should move it into the callback of register(basic), otherwise it's called too soon ;) |
return callback(null, false); | ||
} | ||
|
||
return callback(null, true, { user: user }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just pass the user object? Now you'll have to access it via request.auth.credentials.user
instead of request.auth.credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naturally it feels like like passing object is more useful, for instance if the user object had firstName and lastName or roles, i would get them with the object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @AdriVanHoudt. The user key doesn't add much here.
Closes #118