mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Allow custom label for auth provider (#15673)
* Allow to pass custom label for auth provider * Add tests * Update api/src/cli/utils/create-env/env-stub.liquid * Fix tests Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<v-icon :name="provider.icon" />
|
||||
</div>
|
||||
<div class="sso-title">
|
||||
{{ t('log_in_with', { provider: provider.name }) }}
|
||||
{{ t('log_in_with', { provider: provider.label }) }}
|
||||
</div>
|
||||
</a>
|
||||
</template>
|
||||
@@ -50,7 +50,8 @@ export default defineComponent({
|
||||
ssoProviders.value = providers.value
|
||||
.filter((provider: AuthProvider) => AUTH_SSO_DRIVERS.includes(provider.driver))
|
||||
.map((provider: AuthProvider) => ({
|
||||
name: formatTitle(provider.name),
|
||||
name: provider.name,
|
||||
label: provider.label || formatTitle(provider.name),
|
||||
link: `${getRootPath()}auth/login/${provider.name}?redirect=${window.location.href.replace(
|
||||
location.search,
|
||||
''
|
||||
|
||||
@@ -2,4 +2,5 @@ export interface AuthProvider {
|
||||
driver: string;
|
||||
name: string;
|
||||
icon?: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user