Skip to content
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

Re-send confirmation request #24

Closed
steinitzu opened this issue Apr 12, 2017 · 3 comments
Closed

Re-send confirmation request #24

steinitzu opened this issue Apr 12, 2017 · 3 comments

Comments

@steinitzu
Copy link

Very nice library! Been a breeze to integrate into my Slim3 app.

I wanted to discuss the possibility of re-sending an email confirmation request on demand after registration.
Case being where confirmation link is lost or expired before the user clicks it. In which case the user is stuck in limbo as far as I can tell.

It looks to me that this would mostly be a matter of making createConfirmationRequest public.
A DB DELETE query could also be issued on every call by default to invalidate any previous confirmation tokens for given email so that only the latest one is valid.

Are there any potential issues with this that I'm overlooking?

Best
Steini

@ocram
Copy link
Contributor

ocram commented Apr 12, 2017

Thanks for your appreciation!

Everything you said was correct and this is definitely a missing feature that we must add. I'd even say this should have the highest priority, since undelivered emails can be quite frequent depending on how you sent your emails, and inattentive users will cause problems, anyway.

Regarding the implementation, I wouldn't make that method public but instead create a simple wrapper. This gives us two advantages: The new wrapper can have a meaningful name like resendConfirmation and we can do some additional database queries in the wrapper. First, we could check that the last request has been a while ago, i.e. you shouldn't be able to request a new confirmation just ten minutes after the first one. Second, as you said, we should invalidate the old request.

Thanks for the hint, this is absolutely needed!

@steinitzu
Copy link
Author

steinitzu commented Apr 13, 2017

That sounds great!
Rate limiting would definitely be needed too, should be configurable in some way. Maybe just by passing a min number of seconds that should have passed to resendConfirmation.

@ocram
Copy link
Contributor

ocram commented Aug 25, 2017

Implemented in:

This is available in a new major version, v6.0.0, which comes with a few breaking changes. For a guide on how to upgrade, please see the migration notes in Migration.md.

@ocram ocram closed this as completed Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants