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:
https://auth0.com/docs/quickstart/backend/php-laravel
But can't seem to get it to authenticate me. When I curl as follows:
curl --request GET --url http://localhost/api/test --header 'authorization: auth0_id_token'
I get:
Unauthorized user curl: (6) Could not resolve host: auth0_id_token
In my \routes\api
, I have:
Route::get('/test', array('middleware' => 'auth0.jwt', function() {
return "Hello " . Auth0::jwtuser()->name;
}));
I'm generating the id_token
using this:
https://auth0.com/docs/api/authentication#!#post--oauth-ro
and can see when I go to (https://manage.auth0.com/#/users) that Auth0 thinks the user has logged in.
Any pointers for where I should be looking to try and debug this?