@bagelink/auth 1.12.3 → 1.12.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/api.d.ts +54 -1
  2. package/dist/index.cjs +154 -1181
  3. package/dist/index.d.ts +0 -9
  4. package/dist/index.mjs +155 -1182
  5. package/dist/routes.d.ts +0 -36
  6. package/dist/types.d.ts +68 -1
  7. package/dist/useAuth.d.ts +17 -1
  8. package/package.json +1 -1
  9. package/src/api.ts +118 -0
  10. package/src/index.ts +0 -13
  11. package/src/routes.ts +0 -96
  12. package/src/types.ts +81 -1
  13. package/src/useAuth.ts +103 -0
  14. package/dist/Callback-BHqVaZZm.cjs +0 -4
  15. package/dist/Callback-C-XghN_z.js +0 -4
  16. package/dist/ForgotPasswordPage-BV9tyhHl.cjs +0 -4
  17. package/dist/ForgotPasswordPage-DvttMGb0.js +0 -4
  18. package/dist/LoginPage-hv1wc54S.cjs +0 -4
  19. package/dist/LoginPage-klj1NV4J.js +0 -4
  20. package/dist/ResetPasswordPage-COPrJmW8.cjs +0 -4
  21. package/dist/ResetPasswordPage-nvQ4uupb.js +0 -4
  22. package/dist/SignupPage-m36w9PLJ.cjs +0 -4
  23. package/dist/SignupPage-oUFYApYW.js +0 -4
  24. package/dist/components/auth/ForgotPasswordForm.vue.d.ts +0 -23
  25. package/dist/components/auth/LoginForm.vue.d.ts +0 -58
  26. package/dist/components/auth/ResetPasswordForm.vue.d.ts +0 -28
  27. package/dist/components/auth/SignupForm.vue.d.ts +0 -34
  28. package/dist/components/index.d.ts +0 -4
  29. package/dist/pages/Callback.vue.d.ts +0 -2
  30. package/dist/pages/ForgotPasswordPage.vue.d.ts +0 -13
  31. package/dist/pages/LoginPage.vue.d.ts +0 -38
  32. package/dist/pages/ResetPasswordPage.vue.d.ts +0 -13
  33. package/dist/pages/SignupPage.vue.d.ts +0 -16
  34. package/src/components/auth/ForgotPasswordForm.vue +0 -97
  35. package/src/components/auth/LoginForm.vue +0 -258
  36. package/src/components/auth/ResetPasswordForm.vue +0 -156
  37. package/src/components/auth/SignupForm.vue +0 -231
  38. package/src/components/index.ts +0 -5
  39. package/src/pages/Callback.vue +0 -196
  40. package/src/pages/ForgotPasswordPage.vue +0 -42
  41. package/src/pages/LoginPage.vue +0 -68
  42. package/src/pages/ResetPasswordPage.vue +0 -47
  43. package/src/pages/SignupPage.vue +0 -46
@@ -1,68 +0,0 @@
1
- <script setup lang="ts">
2
- import type { LoginTexts } from '../components/auth/LoginForm.vue'
3
- import { Card } from '@bagelink/vue'
4
- import { useRouter } from 'vue-router'
5
- import LoginForm from '../components/auth/LoginForm.vue'
6
-
7
- interface Props {
8
- /** Custom texts for the login form */
9
- texts?: Partial<LoginTexts>
10
- /** Show/hide specific SSO providers */
11
- github?: boolean
12
- google?: boolean
13
- microsoft?: boolean
14
- apple?: boolean
15
- okta?: boolean
16
- facebook?: boolean
17
- /** SSO button styling */
18
- ssoOutline?: boolean
19
- ssoShowValue?: boolean
20
- ssoBrandBackground?: boolean
21
- /** Show/hide form elements */
22
- showForgotPassword?: boolean
23
- showSignupButton?: boolean
24
- /** Card styling */
25
- cardWidth?: string
26
- cardShadow?: boolean
27
- }
28
-
29
- const props = withDefaults(defineProps<Props>(), {
30
- github: true,
31
- google: true,
32
- microsoft: true,
33
- apple: true,
34
- okta: true,
35
- facebook: true,
36
- ssoOutline: true,
37
- ssoShowValue: true,
38
- ssoBrandBackground: true,
39
- showForgotPassword: true,
40
- showSignupButton: true,
41
- cardWidth: '450px',
42
- cardShadow: true
43
- })
44
-
45
- const router = useRouter()
46
-
47
- function switchForm(form: string) {
48
- if (form === 'signup') {
49
- router.push('/signup')
50
- } else if (form === 'forgot-password') {
51
- router.push('/forgot-password')
52
- }
53
- }
54
- </script>
55
-
56
- <template>
57
- <div class="flex justify-content-center align-items-center min-vh-100 px-1 py-2">
58
- <Card :class="{ shadow: cardShadow }" :style="{ width: cardWidth, maxWidth: '100%' }" class="p-2">
59
- <LoginForm
60
- :texts="texts" :github="github" :google="google" :microsoft="microsoft"
61
- :apple="apple" :okta="okta" :facebook="facebook" :sso-outline="ssoOutline"
62
- :sso-show-value="ssoShowValue" :sso-brand-background="ssoBrandBackground"
63
- :show-forgot-password="showForgotPassword" :show-signup-button="showSignupButton"
64
- @switch-form="switchForm"
65
- />
66
- </Card>
67
- </div>
68
- </template>
@@ -1,47 +0,0 @@
1
- <script setup lang="ts">
2
- import type { ResetPasswordTexts } from '../components/auth/ResetPasswordForm.vue'
3
- import { Card } from '@bagelink/vue'
4
- import { computed } from 'vue'
5
- import { useRouter, useRoute } from 'vue-router'
6
- import ResetPasswordForm from '../components/auth/ResetPasswordForm.vue'
7
-
8
- interface Props {
9
- /** Custom texts for the reset password form */
10
- texts?: Partial<ResetPasswordTexts>
11
- /** Card styling */
12
- cardWidth?: string
13
- cardShadow?: boolean
14
- }
15
-
16
- const props = withDefaults(defineProps<Props>(), {
17
- cardWidth: '450px',
18
- cardShadow: true
19
- })
20
-
21
- const router = useRouter()
22
- const route = useRoute()
23
-
24
- const token = computed(() => route.query.token as string)
25
-
26
- function switchForm(form: string) {
27
- if (form === 'login') {
28
- router.push('/login')
29
- }
30
- }
31
- </script>
32
-
33
- <template>
34
- <div class="flex justify-content-center align-items-center min-vh-100 px-1 py-2">
35
- <Card
36
- :class="{ shadow: cardShadow }"
37
- :style="{ width: cardWidth, maxWidth: '100%' }"
38
- class="p-2"
39
- >
40
- <ResetPasswordForm
41
- :texts="texts"
42
- :token="token"
43
- @switch-form="switchForm"
44
- />
45
- </Card>
46
- </div>
47
- </template>
@@ -1,46 +0,0 @@
1
- <script setup lang="ts">
2
- import type { SignupTexts } from '../components/auth/SignupForm.vue'
3
- import { Card } from '@bagelink/vue'
4
- import { useRouter } from 'vue-router'
5
- import SignupForm from '../components/auth/SignupForm.vue'
6
-
7
- interface Props {
8
- /** Custom texts for the signup form */
9
- texts?: Partial<SignupTexts>
10
- /** Show name fields (first name, last name) */
11
- showNames?: boolean
12
- /** Card styling */
13
- cardWidth?: string
14
- cardShadow?: boolean
15
- }
16
-
17
- const props = withDefaults(defineProps<Props>(), {
18
- showNames: true,
19
- cardWidth: '450px',
20
- cardShadow: true
21
- })
22
-
23
- const router = useRouter()
24
-
25
- function switchForm(form: string) {
26
- if (form === 'login') {
27
- router.push('/login')
28
- }
29
- }
30
- </script>
31
-
32
- <template>
33
- <div class="flex justify-content-center align-items-center min-vh-100 px-1 py-2">
34
- <Card
35
- :class="{ shadow: cardShadow }"
36
- :style="{ width: cardWidth, maxWidth: '100%' }"
37
- class="p-2"
38
- >
39
- <SignupForm
40
- :texts="texts"
41
- :show-names="showNames"
42
- @switch-form="switchForm"
43
- />
44
- </Card>
45
- </div>
46
- </template>