1
When I make the request to recover the token it works, but when I send the request Grant type refresh_token the Laravel cannot decrypt the refresh token.
Angular 2
let params = {
client_id: this.params['client_id'],
client_secret: this.params['client_secret'],
grant_type: 'refresh_token',
refresh_token: this.getRefreshToken()
};
let headers = new Headers();
headers.append('Accept', 'application/json');
headers.append('Content-Type', 'application/x-www-form-urlencoded');
return this.http.post(OauthLoginEndPointUrl, this.utilService.queryBuilder(params),{headers:headers})
.map(resullt => {
this.handleData(resullt);
})
.catch(this.handleError);
The request returns
{"error":"invalid_request","message":"The refresh token is invalid.","hint":"Token is not linked to client"}
solved by sending the request as payload with direct json without using angular 2 Urlsearchparams.
– Diuliano De Sousa Oliveira
it is permissible for Oce to elaborate an answer to his own question, so people with the same problem can find the answer more easily. ;)
– andrepaulo