Update Authentication Tutorial with UserCredentials #4201
Conversation
| // ... | ||
| } | ||
| // ... | ||
| } |
There was a problem hiding this comment.
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.
| "password": "thel0ngp@55w0rd", | ||
| "firstName": "User", | ||
| "lastName": "One" | ||
| "id": "5dd6acee242760334f6aef65", |
There was a problem hiding this comment.
@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.
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 👈