Framework: Email verification with expired token should show an error message by default out of the box

Created on 26 Aug 2018  路  6Comments  路  Source: laravel/framework

  • Laravel Version: 5.7.0
  • PHP Version: 7.2.8
  • Database Driver & Version: irrelevant

Description:

Steps To Reproduce:

On a freshly created application with Email Verification enabled:

  • generate email verification link
  • click on the verification link received after it has expired.

Expected:

The out-of-the-box default behavior should be to show an error message telling the user that the verification link is expired.
A simple and elegant way to do this would be to redirect to /email/verify (just like you currently do) _but_ store a "flash" error message in the session. The default email/verify view should display that flash error message if it set.

Observed:

You are redirected to /email/verify with no indication whatsoever that the verification token is expired, nor even that verification has failed because of any kind of error. You are just seeing the same page from which you generated the verification link in the first place, which says "please check your email for a verification link. If you did not receive the email, click here to request another". This is very confusing, because the user did receive the email and clicking on the verification link is what they just did. Worst UX ever.

Most helpful comment

Unfortunately this GitHub area is not for ideas, suggestions etc. This is only for issues/bugs with the framework code itself.

This is not an idea or suggestion, I have described an actual issue. I provided steps to reproduce, expected and observed behavior. Though on the "expected" side there is more than one possible valid option and I have indeed provided only a vague suggestion, the observed behavior is clearly wrong, and that is a framework issue.

All 6 comments

This is a brand new feature that hasn't even been released yet. There are, undoubtedly, improvements that can be made. Why not submit a pull request and make it the best UX ever?

Hi there,

Welcome to Laravel and we are glad to have you as part of the community.

Unfortunately this GitHub area is not for ideas, suggestions etc. This is only for issues/bugs with the framework code itself.

I will be closing your ticket here. You are able to open a ticket at https://github.com/laravel/ideas

Alternatively you are able to open a PR using the Contributions guidelines: https://laravel.com/docs/5.7/contributions#which-branch

If you feel I've closed this issue in error, please provide more information about how this is a framework issue, and I'll reopen the ticket.

Thanks in advance.

Unfortunately this GitHub area is not for ideas, suggestions etc. This is only for issues/bugs with the framework code itself.

This is not an idea or suggestion, I have described an actual issue. I provided steps to reproduce, expected and observed behavior. Though on the "expected" side there is more than one possible valid option and I have indeed provided only a vague suggestion, the observed behavior is clearly wrong, and that is a framework issue.

Its not a bug though. It's an enhancement.

Either way - feel free to create a PR with your idea, and then Taylor can decide to accept it or not?

Its not a bug though. It's an enhancement.

Plain wrong behavior is always a bug, whether it's because someone forgot to add 1 to a variable, or because they were lazy in deciding how to treat an error.

To be fair, in your opinion it's wrong behavior (and whilst I agree that the current UX is not optimal and a session value or something like that would be better, that is besides the point).

The person who came up with this feature might not have described that behavior. In that case the current behavior is intentional and therefore can not be a bug. So technically, what you are suggesting is a feature/idea.

Was this page helpful?
0 / 5 - 0 ratings