Closed florent-blanvillain closed 5 years ago
Please check the code: https://github.com/alvarosanchez/grails-spring-security-rest/blob/ffa848c9c6dd82f92f2ab489cb5d7a1515c587f2/spring-security-rest/grails-app/controllers/grails/plugin/springsecurity/rest/RestOauthController.groovy#L123 You are providing wrong param when trying to refresh the token.
Hi @florent-blanvillain probably the problem is your Content-type Header. It should be application/x-www-form-urlencoded
Follow a CURL example curl -X POST \ http://127.0.0.1:8080/oauth/access_token \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'grant_type=refresh_token&refresh_token=REFRESH_TOKEN
Thank you very much both of you, indeed it was an encoding issue. 👍
Hello there,
And thank you very much Alvaro 👍 for your plugin I've been using for years now with an Ember.js app.
I'm on my way to upgrade both my backend (=>grails 3.3) and my frontend, anyway ; When the
oauth/refresh_token
is hit, I get a 400 http response code along with the text :Invalid grant_type
Any idea why ?