Skip to content

How to refresh expired token  #215

@mira-thakkar

Description

@mira-thakkar

Couldn't refresh the token for expired token from refresh api

I am following the exact steps from documentation to implement the Refresh token flow. But refersh api returns 401 status for the expired token(Non-expired token works fine), but i suppose refresh_ttl makes sense to refresh expired token

While debugging, I see that it's not going upto controller, but from middleware it gives 401 . I wonder that we're not using any specific middleware for refresh route, so how come package knows that for refresh route, Authenticate middleware will accept expired token, but for other routes, not ?

Your environment:

Q A
Bug yes
Framework Laravel
Framework version 9.42.2
Package version 1.x.y
PHP version 8.1.0

Steps to reproduce

Implement the package as specified in Quick Start, and call refresh api with expired token

Expected behaviour

refresh api should be able to send new token in exchange of expired token

Actual behaviour

refresh api returns 401 response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions