cesargb / laravel-magiclink

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

SQL error when changing token length #31

Closed vanushwashere closed 4 years ago

vanushwashere commented 4 years ago

Database migration creates a column for the token with a maximum length of 100 symbols. But you can change that token length value in configuration to a value bigger than 100 and get the Data too long for column 'token' at row 1 SQL error.

cesargb commented 4 years ago

Thanks, as a first measure it would increase the size in the migrate file, in this case with varchar(255) or varchar(191).

But even so I do not see an optimal way to solve the problem definitely without size limit.

vanushwashere commented 4 years ago

You can fallback to the maximum possible value if the length set more then it and log a warning

cesargb commented 4 years ago

@vanushwashere feel free to send in a PR to fix this.

vanushwashere commented 4 years ago

@cesargb here it is #36

cesargb commented 4 years ago

@vanushwashere thanks for your PR