cesargb / laravel-magiclink

Create link for authenticate in Laravel without password or get private content
MIT License
359 stars 43 forks source link

Add redirect path in config, if link is not valid #22

Closed yelyas20 closed 4 years ago

yelyas20 commented 4 years ago

I need to set a link that contains message to user that says your link is not valid because... The link should be set in config file Thanks

cesargb commented 4 years ago

I've been thinking about this for a few days. Maybe something like this:

'invalid_response' => [
    /*
     | Method called when magiclink is invalid, method accepted: response, view, redirect, abort
   */
    'method' => 'response',
    'arguments => [
        'forbidden', 
        '403'
    ],
],
dannydinges commented 4 years ago

I submitted a pull request to define the controller where you could do whatever you'd want. I think it'd cover this situation for the user as well.

yelyas20 commented 4 years ago

I submitted a pull request to define the controller where you could do whatever you'd want. I think it'd cover this situation for the user as well.

Thank you

cesargb commented 4 years ago

@yelyas20 In the version 2.4.0, you have this features: https://github.com/cesargb/laravel-magiclink#custom-response-when-magiclink-is-invalid

I hope the documentation is clear enough.

yelyas20 commented 4 years ago

Thank you good man