Skip to content

Commit

Permalink
Refactor DI and ServiceProvider for improved Octane compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Oct 14, 2022
1 parent d209be8 commit 66be365
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,18 @@ public function getConfiguration(): Configuration

$configuration = new Configuration($config);

if (! \in_array($configuration->getStrategy(), [Configuration::STRATEGY_API, Configuration::STRATEGY_MANAGEMENT_API], true)) {
// If no sessionStorage is defined, use an LaravelSession store instance.
if (! isset($config['sessionStorage'])) {
$configuration->setSessionStorage(
new LaravelSession($configuration->getSessionStorageId()),
);
}
// If no sessionStorage is defined, use an LaravelSession store instance.
if (! isset($config['sessionStorage'])) {
$configuration->setSessionStorage(
new LaravelSession($configuration->getSessionStorageId()),
);
}

// If no transientStorage is defined, use an LaravelSession store instance.
if (! isset($config['transientStorage'])) {
$configuration->setTransientStorage(
new LaravelSession($configuration->getTransientStorageId()),
);
}
// If no transientStorage is defined, use an LaravelSession store instance.
if (! isset($config['transientStorage'])) {
$configuration->setTransientStorage(
new LaravelSession($configuration->getTransientStorageId()),
);
}

// Give apps an opportunity to mutate the configuration before applying it.
Expand Down

0 comments on commit 66be365

Please sign in to comment.