Skip to content

DOCSP-41241: Laravel Sanctum #3050

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 9 commits into from
Jul 19, 2024
Merged

DOCSP-41241: Laravel Sanctum #3050

merged 9 commits into from
Jul 19, 2024

Conversation

norareidy
Copy link
Contributor

@norareidy norareidy commented Jul 16, 2024

JIRA - https://jira.mongodb.org/browse/DOCSP-41241
Staging - https://preview-mongodbnorareidy.gatsbyjs.io/laravel/DOCSP-41241-stage/user-authentication/#customize-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 16, 2024
@rustagir rustagir self-requested a review July 16, 2024 21:00
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.

I would say in the introduction that Laravel Sanctum work by overriding the default model with a model that brings MongoDB features. Everything else works the same.

Copy link
Contributor

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

a couple of suggestions about flow

Customize User Authentication
-----------------------------

In this section, you can learn how to use the following features to
Copy link
Contributor

Choose a reason for hiding this comment

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

S: before this sentence, add a sentence explaining why someone might want to make a custom model

Laravel Sanctum
~~~~~~~~~~~~~~~

You can install the Laravel Sanctum package to provide API tokens to users
Copy link
Contributor

Choose a reason for hiding this comment

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

S: add a sentence explaining broadly what laravel sanctum is


You can install the Laravel Sanctum package to provide API tokens to users
and authenticate single-page applications. To manage API tokens, Sanctum stores
each token in a database table and authenticates incoming HTTP requests through
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
each token in a database table and authenticates incoming HTTP requests through
each token in a database table and authenticates incoming HTTP requests by using

Comment on lines 131 to 133
To learn more about installing and configuring Laravel Sanctum, see the
`Installation <https://laravel.com/docs/{+laravel-docs-version+}/sanctum#installation>`__
section of the Laravel Sanctum guide.
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
To learn more about installing and configuring Laravel Sanctum, see the
`Installation <https://laravel.com/docs/{+laravel-docs-version+}/sanctum#installation>`__
section of the Laravel Sanctum guide.
To learn more about installing and configuring Laravel Sanctum, see
`Installation <https://laravel.com/docs/{+laravel-docs-version+}/sanctum#installation>`__
in the Laravel Sanctum guide.

Comment on lines 135 to 136
To use Laravel Sanctum with {+odm-short+}, you must modify the ``PersonalAccessToken``
model provided by Sanctum.
Copy link
Contributor

Choose a reason for hiding this comment

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

S: provide a little more explanation of what is required here

@norareidy norareidy marked this pull request as ready for review July 17, 2024 18:08
@norareidy norareidy requested a review from a team as a code owner July 17, 2024 18:08
@norareidy norareidy requested review from rustagir and GromNaN July 17, 2024 18:08
Copy link
Contributor

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

lgtm

@rustagir rustagir self-assigned this Jul 17, 2024
@rustagir rustagir requested a review from GromNaN July 18, 2024 18:58
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.

SGTM

@rustagir rustagir merged commit 994e956 into mongodb:4.6 Jul 19, 2024
26 checks passed
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