Skip to content

[Security] Added login link documentation #14389

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 1 commit into from
Oct 17, 2020

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Oct 11, 2020

Fixes #14324, #14385

@wouterj wouterj added this to the 5.2 milestone Oct 11, 2020
@wouterj wouterj requested a review from weaverryan October 11, 2020 12:00
@wouterj wouterj force-pushed the issue-14324/login-link-auth branch from b4fa831 to f9f3720 Compare October 11, 2020 12:03
Login links, also called "magic links", allow users to login without
passwords. Whenever a user wants to login, a login link is generated and
send to the user (e.g. using an e-mail). The user is logged in as soon as
they visit that link.
Copy link
Contributor

Choose a reason for hiding this comment

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

The user and they feel weird

Why not write : as soon as the link is visited

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

Very nice contribution!

fabpot added a commit to symfony/symfony that referenced this pull request Oct 13, 2020
…henticator (wouterj)

This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Security] Added check_post_only to the login link authenticator

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This is useful when adding a page that requires a user action in order to validate the check link. That is required when using a single-use login link, to workaround browser and email client previews (which trigger a request).

See also the short docs discussion about this: symfony/symfony-docs#14389 (comment)

For reference, I choose this option name as it relates to the `post_only` option in the `FormLoginAuthenticator`, which is about exactly the same thing. I didn't think `post_only` was a 100% clear name, but I'm happy to change this option to that for complete consistency.

cc @weaverryan

Commits
-------

5093e0d [Security] Added check_post_only to the login link authenticator
@wouterj wouterj force-pushed the issue-14324/login-link-auth branch from f9f3720 to bc257ee Compare October 13, 2020 19:50
@wouterj
Copy link
Member Author

wouterj commented Oct 13, 2020

Thanks for the reviews!

I've updated the PR, taking into account the 2 PRs that were merged after creating this PR and the 1 PR that isn't yet merged: symfony/symfony#38552 So please do not merge this yet.

@wouterj wouterj added the Waiting Code Merge Docs for features pending to be merged label Oct 13, 2020
@wouterj wouterj removed the Waiting Code Merge Docs for features pending to be merged label Oct 14, 2020
@wouterj
Copy link
Member Author

wouterj commented Oct 14, 2020

The related PR has been merged, ready to merge imho

@wouterj wouterj force-pushed the issue-14324/login-link-auth branch from bc257ee to 8ed0916 Compare October 17, 2020 13:29
@javiereguiluz javiereguiluz merged commit 640b9ca into symfony:5.x Oct 17, 2020
@javiereguiluz
Copy link
Member

Wouter, thanks for this fantastic contribution! Thanks to reviewers too!!

While merging I tweaked the intro a bit but the rest was left intact.

@wouterj wouterj deleted the issue-14324/login-link-auth branch October 17, 2020 17:47
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.

[Security] Magic login link authentication
5 participants