Skip to content

Commit

Permalink
Added the Auth0Service as a singleton through the classname
Browse files Browse the repository at this point in the history
  • Loading branch information
JCombee authored and joshcanhelp committed Nov 27, 2018
1 parent 1b8aed7 commit 0464bb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Auth0/Login/LoginServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ public function boot()
public function register()
{
// Bind the auth0 name to a singleton instance of the Auth0 Service
$this->app->singleton(Auth0Service::class, function () {
return new Auth0Service();
});
$this->app->singleton('auth0', function () {
return new Auth0Service();
return $this->app->make(Auth0Service::class);
});

// When Laravel logs out, logout the auth0 SDK trough the service
Expand Down

0 comments on commit 0464bb0

Please sign in to comment.