@mframework/layer-auth 0.0.2 → 0.0.4
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/app/composables/schema/customerGroup.ts +8 -0
- package/app/composables/schema/user.ts +47 -0
- package/app/pages/reset-password.vue +2 -1
- package/app/types/adapter.ts +7 -0
- package/app/types/auth.ts +7 -0
- package/app/types/inputs.ts +33 -0
- package/app/types/providers.ts +6 -0
- package/app/types/session.ts +8 -0
- package/app/types/user.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface MeeoviUser {
|
|
2
|
+
instance_id?: string | null
|
|
3
|
+
id: string
|
|
4
|
+
aud?: string | null
|
|
5
|
+
role?: string | null
|
|
6
|
+
email?: string | null
|
|
7
|
+
encrypted_password?: string | null
|
|
8
|
+
email_confirmed_at?: string | null
|
|
9
|
+
invited_at?: string | null
|
|
10
|
+
confirmation_token?: string | null
|
|
11
|
+
confirmation_sent_at?: string | null
|
|
12
|
+
recovery_token?: string | null
|
|
13
|
+
recovery_sent_at?: string | null
|
|
14
|
+
email_change_token_new?: string | null
|
|
15
|
+
email_change?: string | null
|
|
16
|
+
email_change_sent_at?: string | null
|
|
17
|
+
last_sign_in_at?: string | null
|
|
18
|
+
raw_app_meta_data?: Record<string, unknown> | null
|
|
19
|
+
raw_user_meta_data?: Record<string, unknown> | null
|
|
20
|
+
is_super_admin?: boolean | null
|
|
21
|
+
created_at?: string | null
|
|
22
|
+
updated_at?: string | null
|
|
23
|
+
phone?: string | null
|
|
24
|
+
phone_confirmed_at?: string | null
|
|
25
|
+
phone_change?: string | null
|
|
26
|
+
phone_change_token?: string | null
|
|
27
|
+
phone_change_sent_at?: string | null
|
|
28
|
+
confirmed_at?: string | null
|
|
29
|
+
email_change_token_current?: string | null
|
|
30
|
+
email_change_confirm_status?: number | null
|
|
31
|
+
banned_until?: string | null
|
|
32
|
+
reauthentication_token?: string | null
|
|
33
|
+
reauthentication_sent_at?: string | null
|
|
34
|
+
is_sso_user?: boolean
|
|
35
|
+
deleted_at?: string | null
|
|
36
|
+
is_anonymous?: boolean
|
|
37
|
+
identities?: Record<string, unknown>[]
|
|
38
|
+
mfa_factors?: Record<string, unknown>[]
|
|
39
|
+
oauth_authorizations?: Record<string, unknown>[]
|
|
40
|
+
oauth_consents?: Record<string, unknown>[]
|
|
41
|
+
one_time_tokens?: Record<string, unknown>[]
|
|
42
|
+
sessions?: Record<string, unknown>[]
|
|
43
|
+
emoji_reactions?: Record<string, unknown>[]
|
|
44
|
+
profiles?: Record<string, unknown> | null
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
|
|
31
31
|
<script setup>
|
|
32
32
|
import { useHead, useRoute, useRuntimeConfig, navigateTo } from '#app'
|
|
33
|
-
import { definePageMeta
|
|
33
|
+
import { definePageMeta } from '#imports'
|
|
34
34
|
import { z } from 'zod'
|
|
35
35
|
import { reactive, ref } from 'vue'
|
|
36
36
|
import { useAuth } from '../composables/useAuth'
|
|
37
|
+
import { useLocalePath, useI18n } from 'vue-i18n'
|
|
37
38
|
|
|
38
39
|
definePageMeta({
|
|
39
40
|
auth: {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const LoginInputSchema = z.object({
|
|
4
|
+
email: z.string().email(),
|
|
5
|
+
password: z.string().min(8)
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
export type LoginInput = z.infer<typeof LoginInputSchema>
|
|
9
|
+
|
|
10
|
+
export const RegisterInputSchema = z.object({
|
|
11
|
+
email: z.string().email(),
|
|
12
|
+
password: z.string().min(8),
|
|
13
|
+
confirmPassword: z.string().min(8)
|
|
14
|
+
}).refine((data) => data.password === data.confirmPassword, {
|
|
15
|
+
message: 'Passwords do not match',
|
|
16
|
+
path: ['confirmPassword']
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
export type RegisterInput = z.infer<typeof RegisterInputSchema>
|
|
20
|
+
|
|
21
|
+
export const ForgotPasswordInputSchema = z.object({
|
|
22
|
+
email: z.string().email()
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
export type ForgotPasswordInput = z.infer<typeof ForgotPasswordInputSchema>
|
|
26
|
+
|
|
27
|
+
export const ResetPasswordInputSchema = z.object({
|
|
28
|
+
token: z.string(),
|
|
29
|
+
password: z.string().min(8),
|
|
30
|
+
confirmPassword: z.string().min(8)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export type ResetPasswordInput = z.infer<typeof ResetPasswordInputSchema>
|