Skip to content

Different algorithms for JWT token encoding and decoding #670

@countbytedown

Description

@countbytedown

When consuming your API with Passport as described in the Documentation there is a different type of functionality used for the encoding of the token compared to decoding.

Line 64 of laravel/passport/src/ApiTokenCookieFactory.php
Line 187 of laravel/passport/src/Guards/TokenGuard.php

One of the functions calls the internal Laravel decrypter function which does not use the urlsafeB64Decode function. For certain combinations this will obviously fail.

Is this intentional? My API requests will constantly fail if the code is not modified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions