jeudi 9 janvier 2020

ciphertext is too short when using laravel/passport

Can anyone help with a problem I'm getting with setting up laravel/passport?

I've currently got the granting clients access to user data sorted and it's storing auth_codes in the DB fine.

However, when going to POST http://my-app.test/oauth/token to retrieve access tokens I'm getting the following response.

{
    "error": "invalid_request",
    "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
    "hint": "Cannot decrypt the authorization code",
    "message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
}

I'm sending through the following params

grant_type:authorization_code
client_id:3
client_secret:TYSRJyZAGeSAnzFYyYKAp5F15C4EJiea4V5oamm2
redirect_ui:http://my-app.test/callback
code:5f2d0685414689cc322d10e5ada221e020d00036b1f9fe4154e5578511ed2a51373aa187142a96f2

A bit of digging through passport, I've tracked down that the defuse/php-encryption package is throwing the following error:

Ciphertext is too short

Could this be related & what should I do to solve that if so? I've attempted with both sodium/mcrypt php extensions.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire