Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-4337] feat: Add setting to define search path for configuration files #407

Merged
merged 4 commits into from
Jun 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Add setting to define search path for configuration files (.aut…
…h0.*.json, .env*)
evansims committed Jun 13, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
BridgeAR Ruben Bridgewater
commit 778fc5f1e792926a29a36f94ebc3e4a70ddfa7ed
1 change: 1 addition & 0 deletions config/auth0.php
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
'registerGuards' => true,
'registerMiddleware' => true,
'registerAuthenticationRoutes' => true,
'configurationPath' => null,

'guards' => [
'default' => [
8 changes: 7 additions & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
@@ -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;