Looking for the 'convenience' of Auth0 to sort out JWTs between my Angular 2 client and Laravel 5.3 api, I've followed (and double-checked that I've followed) Auth0's getting started guide:
...but can't seem to get it to authenticate me. When I curl as follows:
curl --request GET --url http://ift.tt/2fLahzJ --header 'authorization: aLongBearerTokenz'
I get:
Unauthorized usercurl: (6) Could not resolve host: aLongBearerTokenz
In my \routes\api, I have:
Route::get('/protected', array('middleware' => 'auth0.jwt', function() {
return "Hello " . Auth0::jwtuser()->name;
}));
I'm generating the bearerToken using this:
and can see when I go to: http://ift.tt/2fL3fuE that Auth0 thinks the user has logged in...
Any pointers for where I should be looking to try and debug this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire