Closed jfhernandeze closed 8 years ago
That's true indeed. Thanks for noticing it out and reprinting it. Would you mind sending a pull request with a fix and a comment why we can't use response macros here?
@jfhernandeze hope you can tell use how to produce this error so we can make correction and test it as well
@masterpowers you just need to return compact('token');
instead of response()->api(compact('token'));
Give it a try and let me know if it works
Yes I will send a pull request to fix this
On Thu, Oct 15, 2015 at 5:39 AM, Jad Joubran notifications@github.com wrote:
@masterpowers https://github.com/masterpowers you just need to return compact('token'); instead of response()->api(compact('token')); Give it a try and let me know if it works
— Reply to this email directly or view it on GitHub https://github.com/jadjoubran/laravel5-angular-material-starter/issues/81#issuecomment-148347339 .
Thanks @jfhernandeze @masterpowers this has been fixed through #82 - let me know if this works for you Ths fix will be available in 2.10.2
If I use it out of the box I keep getting this error:
Error: Expecting a token named "token" but instead got: {"data":{"token":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdDo4MDAwXC9hcGlcL2F1dGhlbnRpY2F0ZVwvYXV0aCIsImlhdCI6IjE0NDQ4NzQ2NTMiLCJleHAiOiIxNDQ0ODc4MjUzIiwibmJmIjoiMTQ0NDg3NDY1MyIsImp0aSI6IjNkMTZiM2UwZDQ3ZTE4ZjUwZDMyMDY1YjM1ZjUwOWNkIn0.OIekyUWq6D-ftpK66h5Yvbg7VmnQHr9E9DMKdpMzTXc"}}
I just change this line in
AuthenticateController.php
to:
And works perfectly