Skip to content

Commit

Permalink
[SDK-4337] feat: Add setting to define search path for configuration …
Browse files Browse the repository at this point in the history
…files (#407)
  • Loading branch information
evansims authored Jun 13, 2023
1 parent 6275efe commit 10e038b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'registerGuards' => true,
'registerMiddleware' => true,
'registerAuthenticationRoutes' => true,
'configurationPath' => null,

'guards' => [
'default' => [
Expand Down
8 changes: 7 additions & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,13 @@ public static function getJson(): array
public static function getPath(): string
{
if (null === self::$path) {
self::$path = base_path() . DIRECTORY_SEPARATOR;
$path = config('auth0.configurationPath');

if (! is_string($path)) {
$path = base_path() . DIRECTORY_SEPARATOR;
}

self::$path = $path;
}

return self::$path;
Expand Down

0 comments on commit 10e038b

Please sign in to comment.