-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update Authentication Tutorial with UserCredentials #4201
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
Conversation
| // ... | ||
| } | ||
| // ... | ||
| } |
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.
Before this change, GitHub's syntax highlighter was confused - notice the text in "Securing and Enpoint..." is rendered in blue:
Also Prettier was not able to automatically format the code. Once I added closing curly braces, Prettier shortened the import line and GitHub started to render the text in the next section as regular text (in black color) again.
jannyHou
left a comment
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.
👍 LGTM
| "password": "thel0ngp@55w0rd", | ||
| "firstName": "User", | ||
| "lastName": "One" | ||
| "id": "5dd6acee242760334f6aef65", |
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.
@bajtos , let's avoid passing in an 'id' field with an ObjectID value to make it easy for the user. Mongo db will create the Object ID , and we will show later when /users/me is called.
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.
Just like the old example showed, it is also possible to pass in ids with values like "1" and "2", and this is easier for the user to do when creating new users.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
748a4d6 to
28bddf8
Compare

In loopbackio/loopback4-example-shopping#385, I am extracting local user credentials to a new model
UserCredentials.This pull requests updates our documentation to be in sync with the new version of our shopping example app.
Resolve #1996
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated👉 Check out how to submit a PR 👈