jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 401 forks source link

JWT Login Not Working #458

Closed amirdauti closed 7 years ago

amirdauti commented 7 years ago

When trying to login the loading bar goes to 90% and the page does not redirect to anything. When refreshing after a login I see a blank page with the loading bar at the top and the following errors show up in the console.

Error: [$compile:tpload] Failed to load template: ./views/app/components/app-shell/app-shell.component.html

"Broken interceptor detected: Config object not supplied in rejection: https://github.com/chieffancypants/angular-loading-bar/pull/50"

Error: [$compile:tpload] Failed to load template: ./views/app/components/app-root/app-root.component.html (HTTP status: undefined undefined)

DOMException [SyntaxError: "An invalid or illegal string was specified" code: 12

nsresult: 0x8053000c location: http://tranqool.local/build/js/final-8bbae0db31.js:12343] createHttpBackend/</<@http://tranqool.local/build/js/final-8bbae0db31.js:12343:13 forEach@http://tranqool.local/build/js/final-8bbae0db31.js:371:11 createHttpBackend/<@http://tranqool.local/build/js/final-8bbae0db31.js:12341:7 sendReq@http://tranqool.local/build/js/final-8bbae0db31.js:12155:9 serverRequest@http://tranqool.local/build/js/final-8bbae0db31.js:11908:16 processQueue@http://tranqool.local/build/js/final-8bbae0db31.js:16648:37 scheduleProcessQueue/<@http://tranqool.local/build/js/final-8bbae0db31.js:16692:27 $RootScopeProvider/this.$get</Scope.prototype.$eval@http://tranqool.local/build/js/final-8bbae0db31.js:17972:16 $RootScopeProvider/this.$get</Scope.prototype.$digest@http://tranqool.local/build/js/final-8bbae0db31.js:17786:15 $RootScopeProvider/this.$get</Scope.prototype.$apply@http://tranqool.local/build/js/final-8bbae0db31.js:18080:13 bootstrapApply@http://tranqool.local/build/js/final-8bbae0db31.js:1841:9 invoke@http://tranqool.local/build/js/final-8bbae0db31.js:4842:16 bootstrap/doBootstrap@http://tranqool.local/build/js/final-8bbae0db31.js:1839:5 bootstrap@http://tranqool.local/build/js/final-8bbae0db31.js:1859:12 angularInit@http://tranqool.local/build/js/final-8bbae0db31.js:1744:5 @http://tranqool.local/build/js/final-8bbae0db31.js:32977:5 trigger@http://tranqool.local/build/js/final-8bbae0db31.js:3314:5 final-8bbae0db31.js:38841:18 unreachable code after return statement[Learn More]

jadjoubran commented 7 years ago

Hello @amirdauti Could you please check what the logs say in storage/framework/laravel.log?

jadjoubran commented 7 years ago

There's a probably an issue happening on the backend that's messing up the response interceptor for the loading bar plugin

2140093 commented 7 years ago

When I encountered this issue, the satellizer_token in the browser's local storage contained an error instead of the actual token. This could be fixed by deleting the bad token and uncommenting the always_populate_raw_post_data = -1 in php.ini. Hope this helps!