Open TechInterMezzo opened 4 years ago
I think Auth Providers will help you.
you can enable any of our Single Sing-On (SSO) services or create your own adapter for custom authentication. Directus also supports SCIM for external user management.
As mentioned on doc Directus only support Okta, Github, Facebook, Google, Twitter for SSO. But you can write your own adapter for custom authentication.
This is expected Directus behavior.
As mentioned on doc Directus only support Okta, Github, Facebook, Google, Twitter for SSO. But you can write your own adapter for custom authentication.
This is expected Directus behavior.
There is even a line of code that clearly states that you are expecting your own core SSO adapters and custom ones:
$coreSso = \Directus\get_custom_x('auth', 'public/extensions/core/auth', true);
$customSso = \Directus\get_custom_x('auth', 'public/extensions/custom/auth', true);
But the custom ones can't be used because of the bug I reported at the top. And how should I even implement my own adapter if not by using a custom auth.php and provider class?
Can we confirm that the custom ones work? I'll reopen this in the meantime.
@TechInterMezzo Yes, You are right, We are only accepting the config defined in https://github.com/directus/directus/blob/c894e6730a20172c578457f54ad00516fdb583c9/src/core/Directus/Config/Schema/Schema.php#L120 All the additional configs are removed.
Ref https://github.com/directus/docker/issues/78 https://github.com/directus/api/issues/1468
Yes, same problem I was facing in #1902. Would be nice if "unknown" social_provider-configs would be allowed there...
Bug Report
If I add any other auth provider than one of the core extensions (facebook, google, etc.) the array at the following line of code is returned empty:
https://github.com/directus/directus/blob/c894e6730a20172c578457f54ad00516fdb583c9/src/core/Directus/Application/CoreServicesProvider.php#L752
So I can't register any custom auth provider.
Could it be that the config schema is the source of the problem? I can just guess at the moment that everything that is not part of the scheme gets removed from the config at runtime.
https://github.com/directus/directus/blob/c894e6730a20172c578457f54ad00516fdb583c9/src/core/Directus/Config/Schema/Schema.php#L120