@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.
- package/dist/api.d.ts +54 -1
- package/dist/index.cjs +154 -1181
- package/dist/index.d.ts +0 -9
- package/dist/index.mjs +155 -1182
- package/dist/routes.d.ts +0 -36
- package/dist/types.d.ts +68 -1
- package/dist/useAuth.d.ts +17 -1
- package/package.json +1 -1
- package/src/api.ts +118 -0
- package/src/index.ts +0 -13
- package/src/routes.ts +0 -96
- package/src/types.ts +81 -1
- package/src/useAuth.ts +103 -0
- package/dist/Callback-BHqVaZZm.cjs +0 -4
- package/dist/Callback-C-XghN_z.js +0 -4
- package/dist/ForgotPasswordPage-BV9tyhHl.cjs +0 -4
- package/dist/ForgotPasswordPage-DvttMGb0.js +0 -4
- package/dist/LoginPage-hv1wc54S.cjs +0 -4
- package/dist/LoginPage-klj1NV4J.js +0 -4
- package/dist/ResetPasswordPage-COPrJmW8.cjs +0 -4
- package/dist/ResetPasswordPage-nvQ4uupb.js +0 -4
- package/dist/SignupPage-m36w9PLJ.cjs +0 -4
- package/dist/SignupPage-oUFYApYW.js +0 -4
- package/dist/components/auth/ForgotPasswordForm.vue.d.ts +0 -23
- package/dist/components/auth/LoginForm.vue.d.ts +0 -58
- package/dist/components/auth/ResetPasswordForm.vue.d.ts +0 -28
- package/dist/components/auth/SignupForm.vue.d.ts +0 -34
- package/dist/components/index.d.ts +0 -4
- package/dist/pages/Callback.vue.d.ts +0 -2
- package/dist/pages/ForgotPasswordPage.vue.d.ts +0 -13
- package/dist/pages/LoginPage.vue.d.ts +0 -38
- package/dist/pages/ResetPasswordPage.vue.d.ts +0 -13
- package/dist/pages/SignupPage.vue.d.ts +0 -16
- package/src/components/auth/ForgotPasswordForm.vue +0 -97
- package/src/components/auth/LoginForm.vue +0 -258
- package/src/components/auth/ResetPasswordForm.vue +0 -156
- package/src/components/auth/SignupForm.vue +0 -231
- package/src/components/index.ts +0 -5
- package/src/pages/Callback.vue +0 -196
- package/src/pages/ForgotPasswordPage.vue +0 -42
- package/src/pages/LoginPage.vue +0 -68
- package/src/pages/ResetPasswordPage.vue +0 -47
- package/src/pages/SignupPage.vue +0 -46
package/src/pages/LoginPage.vue
DELETED
|
@@ -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>
|
package/src/pages/SignupPage.vue
DELETED
|
@@ -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>
|