Skip to content

Wrong remaining minutes when blacklisting a token #2250

@mohph197

Description

@mohph197

Subject of the issue

When invalidating a token, an amount of minutes is calculated to specify how much the token should stay in the Blacklist
The problem is in the way it's calculated seems wrong, at least in my case it was wrong it just needs to be turned to positive before returning, and also for some reason the "diffInRealMinutes" Carbon method is used, I didn't find it anywhere in Carbon's actual Doc

Your environment

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 11.0.7
Package version 2.1
PHP version 8.2.12

Steps to reproduce

Try logging in with the login, and then using the refresh route

Expected behavior

Here the token from login should be invalidated by default
So you should expect a new entry in the cache table in the database (if all the configurations are exactly as the defaults of Laravel 11.x)

Actual behavior

No entry is introduced, and the token is still valid (you can actually perform many consecutive calls to refresh with the same token)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions