Skip to content

Conversation

@bajtos
Copy link
Member

@bajtos bajtos commented Nov 25, 2019

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 test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

// ...
}
// ...
}
Copy link
Member Author

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:

Screen Shot 2019-11-25 at 09 36 02

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.

Copy link
Contributor

@jannyHou jannyHou left a 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",
Copy link
Contributor

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.

Copy link
Contributor

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.

@bajtos
Copy link
Member Author

bajtos commented Nov 25, 2019

let's avoid passing in an 'id' field with an ObjectID value to make it easy for the user.

Fixed in 748a4d6. @emonddr LGTY now?

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
@bajtos bajtos force-pushed the docs/auth-in-shopping-example branch from 748a4d6 to 28bddf8 Compare November 26, 2019 14:52
@bajtos bajtos merged commit 5bf50b7 into master Nov 28, 2019
@bajtos bajtos deleted the docs/auth-in-shopping-example branch November 28, 2019 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactoring: Customer credentials

4 participants