Skip to content

DOCSP-38100: User authentication #3034

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

Merged
merged 8 commits into from
Jul 16, 2024
Merged

DOCSP-38100: User authentication #3034

merged 8 commits into from
Jul 16, 2024

Conversation

norareidy
Copy link
Contributor

@norareidy norareidy commented Jul 8, 2024

JIRA - https://jira.mongodb.org/browse/DOCSP-38100
Staging - https://preview-mongodbnorareidy.gatsbyjs.io/laravel/DOCSP-38100/user-authentication/

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file
  • Update documentation for new features

@github-actions github-actions bot added the docs label Jul 8, 2024
@norareidy norareidy requested a review from GromNaN July 8, 2024 17:14
@norareidy norareidy requested a review from GromNaN July 9, 2024 14:53
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@norareidy norareidy marked this pull request as ready for review July 16, 2024 14:09
@norareidy norareidy requested a review from a team as a code owner July 16, 2024 14:09
Copy link
Contributor

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small changes and suggestions but LGTM otherwise

Comment on lines 23 to 24
In this guide, you can learn how to authenticate users stored in MongoDB
by using Laravel's native authentication functionality.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: applies throughout

Suggested change
In this guide, you can learn how to authenticate users stored in MongoDB
by using Laravel's native authentication functionality.
In this guide, you can learn how to authenticate MongoDB users
by using Laravel's native authentication functionality.

In this guide, you can learn how to authenticate users stored in MongoDB
by using Laravel's native authentication functionality.

Laravel provides a native Auth module that includes authentication services,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: not sure whether this is standard for PHP/Laravel, but I'd guess it helps readability

Suggested change
Laravel provides a native Auth module that includes authentication services,
Laravel provides a native ``Auth`` module that includes authentication services,

must extend the ``MongoDB\Laravel\Auth\User`` class.

To extend this class, navigate to your ``app/Models/User.php`` file and replace the
``use Illuminate\Foundation\Auth\User as Authenticatable`` use statement with the following
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
``use Illuminate\Foundation\Auth\User as Authenticatable`` use statement with the following
``use Illuminate\Foundation\Auth\User as Authenticatable`` statement with the following


use MongoDB\Laravel\Auth\User as Authenticatable;

Ensure that your ``User`` class extends ``Authenticatable``, as shown in the following code:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: Might help to link this step to the previous one

Suggested change
Ensure that your ``User`` class extends ``Authenticatable``, as shown in the following code:
Next, ensure that your ``User`` class extends ``Authenticatable``, as shown in the following code:

Comment on lines 56 to 57
After configuring your ``User`` model, create a corresponding controller. For instructions on
creating a controller, see the :ref:`laravel-auth-controller` section on this page.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: on/about

Suggested change
After configuring your ``User`` model, create a corresponding controller. For instructions on
creating a controller, see the :ref:`laravel-auth-controller` section on this page.
After configuring your ``User`` model, create a corresponding controller. To learn how to
create a controller, see the :ref:`laravel-auth-controller` section on this page.

Example
~~~~~~~

The following code demonstrates a ``User.php`` file that extends the ``MongoDB\Laravel\Auth\User``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S: shows? displays? "demonstrates" is more active to me

Suggested change
The following code demonstrates a ``User.php`` file that extends the ``MongoDB\Laravel\Auth\User``
The following code shows a ``User.php`` file that extends the ``MongoDB\Laravel\Auth\User``

@norareidy norareidy merged commit 7df42cd into mongodb:4.5 Jul 16, 2024
26 checks passed
@norareidy norareidy deleted the DOCSP-38100-user-authentication branch July 16, 2024 15:08
This was referenced Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants