Repository navigation
[13.x] remember token is nullable - #62105
Merged
Merged
Conversation
the remember token is nullable, so we should allow setting it to `null`. it's just a docblock so there's not actual language enforcement, but static analysis can still complain about it. https://github.com/laravel/framework/blob/13.x/src/Illuminate/Database/Schema/Blueprint.php#L1745
matches the changes I made in the `Authenticatable` trait
Member
|
null |
Contributor
Author
|
@crynobone can you explain why? I'm currently using them in my application, and basically every default Laravel application starts with If it truly is a security risk, should we consider updating the default migration? |
Contributor
Author
|
@crynobone do you have an explanation on the security risk, or anything I can read? I'm struggling to find any information about security risks with a nullable token. |
binaryfire
added a commit
to hypervel/components-backup
that referenced
this pull request
Oct 26, 2026
Apply laravel/framework#62105 (5c0486f5a5) and #61876 (df12f83ce8). The Authenticatable contract, trait and GenericUser now accept null when clearing a remember token. Update implementing fixtures and the authentication contract example to match. GenericUser returns null when its password attribute is absent, avoiding a warning during passwordless login. Port the complete upstream passwordless-login regression and add token-clearing regressions for both user implementations. Both defects reproduce before correction. Formatting, full source and type analysis, the Auth suite and every affected Broadcasting, JWT, Sanctum and Telescope test file pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the remember token is nullable, so we should allow setting it to
null.it's just a docblock so there's not actual language enforcement, but static analysis can still complain about it.
https://github.com/laravel/framework/blob/13.x/src/Illuminate/Database/Schema/Blueprint.php#L1745