drop/server/components/Auth/OpenID.vue

28 lines
823 B
Vue
Raw Permalink Normal View History

2025-05-07 22:14:04 +10:00
<template>
<div class="flex">
<a
2025-05-15 21:22:24 +10:00
:href="`/auth/oidc?redirect=${route.query.redirect ?? '/'}`"
2025-05-07 22:14:04 +10:00
class="transition rounded-md grow inline-flex items-center justify-center bg-white/10 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-white/20"
>
2026-01-21 08:15:01 +00:00
<i18n-t
keypath="auth.signin.signinWithExternalProvider"
tag="span"
scope="global"
>
<template #externalProvider>{{
providerName || $t("auth.signin.externalProvider")
}}</template>
<template #arrow>
<span aria-hidden="true">{{ $t("chars.arrow") }}</span>
</template>
</i18n-t>
2025-05-07 22:14:04 +10:00
</a>
</div>
</template>
2025-05-15 21:22:24 +10:00
<script setup lang="ts">
const route = useRoute();
2026-01-21 08:15:01 +00:00
const { providerName = undefined } = defineProps<{ providerName?: string }>();
2025-05-15 21:22:24 +10:00
</script>