{"action":"created","issue":{"url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/220","labels_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/220/comments","events_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/220/events","html_url":"https://github.com/tymondesigns/jwt-auth/issues/220","id":102268159,"number":220,"title":"$app['Tymon\\JWTAuth\\JWTAuth'] Get into a forever loop","user":{"login":"tienkhoi","id":7607653,"avatar_url":"https://avatars.githubusercontent.com/u/7607653?v=3","gravatar_id":"","url":"https://api.github.com/users/tienkhoi","html_url":"https://github.com/tienkhoi","followers_url":"https://api.github.com/users/tienkhoi/followers","following_url":"https://api.github.com/users/tienkhoi/following{/other_user}","gists_url":"https://api.github.com/users/tienkhoi/gists{/gist_id}","starred_url":"https://api.github.com/users/tienkhoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienkhoi/subscriptions","organizations_url":"https://api.github.com/users/tienkhoi/orgs","repos_url":"https://api.github.com/users/tienkhoi/repos","events_url":"https://api.github.com/users/tienkhoi/events{/privacy}","received_events_url":"https://api.github.com/users/tienkhoi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T00:34:32Z","updated_at":"2015-08-22T18:54:13Z","closed_at":"2015-08-22T18:54:13Z","body":"Hi All,\r\n\r\nIm trying to setup dingo and JWT so I have setup like this\r\n```\r\n 'auth' => [\r\n        'basic' => function ($app) {\r\n            return new Dingo\\Api\\Auth\\Provider\\Basic($app['auth'], 'email');\r\n        },\r\n        'jwt' => function ($app) {\r\n            return new Dingo\\Api\\Auth\\Provider\\JWT($app['Tymon\\JWTAuth\\JWTAuth']);\r\n\r\n        }\r\n    ],\r\n```\r\nIt keep giving me \r\n```\r\n[2015-08-20 19:49:04] local.ERROR: exception 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' with message 'Maximum function nesting level of '100' reached, aborting!' in /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php:172\r\nStack trace:\r\n#0 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(133): Symfony\\Component\\Debug\\Exception\\FatalErrorException->__construct()\r\n#1 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(118): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->fatalExceptionFromError()\r\n#2 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(0): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleShutdown()\r\n#3 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(256): Illuminate\\Container\\Container->bind()\r\n#4 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php(49): Illuminate\\Container\\Container->singleton()\r\n#5 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php(37): Illuminate\\Cache\\CacheServiceProvider->registerCommands()\r\n#6 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(531): Illuminate\\Cache\\CacheServiceProvider->register()\r\n#7 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(648): Illuminate\\Foundation\\Application->register()\r\n#8 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(628): Illuminate\\Foundation\\Application->registerDeferredProvider()\r\n#9 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(671): Illuminate\\Foundation\\Application->loadDeferredProvider()\r\n#10 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(1157): Illuminate\\Foundation\\Application->make()\r\n#11 /home/vagrant/Projects/calendarP/vendor/tymon/jwt-auth/src/Providers/JWTAuthServiceProvider.php(163): Illuminate\\Container\\Container->offsetGet()\r\n#12 /home/vagrant/Projects/calendarP/vendor/tymon/jwt-auth/src/Providers/JWTAuthServiceProvider.php(260): Illuminate\\Foundation\\Bootstrap\\LoadConfiguration->{closure:/home/vagrant/Projects/calendarP/config/jwt.php:162-164}()\r\n#13 /home/vagrant/Projects/calendarP/vendor/tymon/jwt-auth/src/Providers/JWTAuthServiceProvider.php(260): call_user_func:{/home/vagrant/Projects/calendarP/vendor/tymon/jwt-auth/src/Providers/JWTAuthServiceProvider.php:260}()\r\n#14 /home/vagrant/Projects/calendarP/vendor/tymon/jwt-auth/src/Providers/JWTAuthServiceProvider.php(149): Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider->getConfigInstance()\r\n#15 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(274): Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider->Tymon\\JWTAuth\\Providers\\{closure}()\r\n#16 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(733): Illuminate\\Container\\Container->Illuminate\\Container\\{closure}()\r\n#17 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(626): Illuminate\\Container\\Container->build()\r\n#18 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\\Container\\Container->make()\r\n#19 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(1157): Illuminate\\Foundation\\Application->make()\r\n#20 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(204): Illuminate\\Container\\Container->offsetGet()\r\n#21 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(274): Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider->Tymon\\JWTAuth\\Providers\\{closure}()\r\n#22 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(733): Illuminate\\Container\\Container->Illuminate\\Container\\{closure}()\r\n#23 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(626): Illuminate\\Container\\Container->build()\r\n#24 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\\Container\\Container->make()\r\n#25 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(1157): Illuminate\\Foundation\\Application->make()\r\n#26 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(172): Illuminate\\Container\\Container->offsetGet()\r\n#27 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(274): Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider->Tymon\\JWTAuth\\Providers\\{closure}()\r\n#28 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(733): Illuminate\\Container\\Container->Illuminate\\Container\\{closure}()\r\n#29 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(626): Illuminate\\Container\\Container->build()\r\n#30 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\\Container\\Container->make()\r\n#31 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(1157): Illuminate\\Foundation\\Application->make()\r\n#32 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(188): Illuminate\\Container\\Container->offsetGet()\r\n#33 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(274): Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider->Tymon\\JWTAuth\\Providers\\{closure}()\r\n#34 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(733): Illuminate\\Container\\Container->Illuminate\\Container\\{closure}()\r\n#35 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(626): Illuminate\\Container\\Container->build()\r\n#36 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\\Container\\Container->make()\r\n#37 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(1157): Illuminate\\Foundation\\Application->make()\r\n#38 /home/vagrant/Projects/calendarP/vendor/laravel/framework/src/Illuminate/Container/Container.php(43): Illuminate\\Container\\Container->offsetGet()\r\n```\r\n\r\nI find out that this line\r\n```\r\n$app['Tymon\\JWTAuth\\JWTAuth'] \r\n``` \r\nleads into an infinity loop.\r\n\r\nAny ideas to get around this issue?\r\n\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/comments/133739932","html_url":"https://github.com/tymondesigns/jwt-auth/issues/220#issuecomment-133739932","issue_url":"https://api.github.com/repos/tymondesigns/jwt-auth/issues/220","id":133739932,"user":{"login":"tymondesigns","id":1801923,"avatar_url":"https://avatars.githubusercontent.com/u/1801923?v=3","gravatar_id":"","url":"https://api.github.com/users/tymondesigns","html_url":"https://github.com/tymondesigns","followers_url":"https://api.github.com/users/tymondesigns/followers","following_url":"https://api.github.com/users/tymondesigns/following{/other_user}","gists_url":"https://api.github.com/users/tymondesigns/gists{/gist_id}","starred_url":"https://api.github.com/users/tymondesigns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tymondesigns/subscriptions","organizations_url":"https://api.github.com/users/tymondesigns/orgs","repos_url":"https://api.github.com/users/tymondesigns/repos","events_url":"https://api.github.com/users/tymondesigns/events{/privacy}","received_events_url":"https://api.github.com/users/tymondesigns/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T18:54:13Z","updated_at":"2015-08-22T18:54:13Z","body":"Not sure what could be causing this.. I think it's likely that something else is affecting your issue though, since I haven't seen anyone else with this issue"}}