@drmhse/authos-vue 0.1.4 → 0.2.0
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/README.md +20 -4
- package/dist/index.d.mts +86 -3
- package/dist/index.d.ts +86 -3
- package/dist/index.js +631 -49
- package/dist/index.mjs +632 -49
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -46,10 +46,10 @@ import { SignIn, SignedIn, SignedOut, UserButton } from '@drmhse/authos-vue';
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
That's it. You now have:
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
49
|
+
- Email/password authentication with MFA support
|
|
50
|
+
- Automatic session management
|
|
51
|
+
- User dropdown with logout
|
|
52
|
+
- Conditional rendering based on auth state
|
|
53
53
|
|
|
54
54
|
## Usage Modes
|
|
55
55
|
|
|
@@ -167,6 +167,22 @@ Registration form for new users.
|
|
|
167
167
|
<SignUp @success="console.log('Check your email!')" @error="console.error" />
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
+
### MagicLinkSignIn
|
|
171
|
+
|
|
172
|
+
Sign-in component for Magic Links (passwordless).
|
|
173
|
+
|
|
174
|
+
```vue
|
|
175
|
+
<MagicLinkSignIn @success="console.log('Magic link sent!')" />
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### PasskeySignIn
|
|
179
|
+
|
|
180
|
+
Sign-in component for Passkeys (WebAuthn).
|
|
181
|
+
|
|
182
|
+
```vue
|
|
183
|
+
<PasskeySignIn @success="console.log('Authenticated!')" />
|
|
184
|
+
```
|
|
185
|
+
|
|
170
186
|
### SignedIn / SignedOut
|
|
171
187
|
|
|
172
188
|
Conditional rendering based on authentication state. Inspired by Clerk's API.
|
package/dist/index.d.mts
CHANGED
|
@@ -40,6 +40,53 @@ interface AuthOSContext {
|
|
|
40
40
|
* }));
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
+
/**
|
|
44
|
+
* Appearance variables for customizing the visual theme.
|
|
45
|
+
* All properties are optional and use CSS color/size values.
|
|
46
|
+
*/
|
|
47
|
+
interface AppearanceVariables {
|
|
48
|
+
/** Primary brand color (e.g., '#6366f1') */
|
|
49
|
+
colorPrimary?: string;
|
|
50
|
+
/** Primary color on hover */
|
|
51
|
+
colorPrimaryHover?: string;
|
|
52
|
+
/** Text color on primary background */
|
|
53
|
+
colorPrimaryForeground?: string;
|
|
54
|
+
/** Error/danger color */
|
|
55
|
+
colorDanger?: string;
|
|
56
|
+
/** Success color */
|
|
57
|
+
colorSuccess?: string;
|
|
58
|
+
/** Warning color */
|
|
59
|
+
colorWarning?: string;
|
|
60
|
+
/** Main background color */
|
|
61
|
+
colorBackground?: string;
|
|
62
|
+
/** Surface/card background color */
|
|
63
|
+
colorSurface?: string;
|
|
64
|
+
/** Main text color */
|
|
65
|
+
colorForeground?: string;
|
|
66
|
+
/** Muted/secondary text color */
|
|
67
|
+
colorMuted?: string;
|
|
68
|
+
/** Border color */
|
|
69
|
+
colorBorder?: string;
|
|
70
|
+
/** Input background color */
|
|
71
|
+
colorInput?: string;
|
|
72
|
+
/** Input border color */
|
|
73
|
+
colorInputBorder?: string;
|
|
74
|
+
/** Focus ring color */
|
|
75
|
+
colorRing?: string;
|
|
76
|
+
/** Font family */
|
|
77
|
+
fontFamily?: string;
|
|
78
|
+
/** Base font size */
|
|
79
|
+
fontSize?: string;
|
|
80
|
+
/** Border radius */
|
|
81
|
+
borderRadius?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Appearance configuration for customizing component styling.
|
|
85
|
+
*/
|
|
86
|
+
interface AppearanceOptions {
|
|
87
|
+
/** CSS variable overrides */
|
|
88
|
+
variables?: AppearanceVariables;
|
|
89
|
+
}
|
|
43
90
|
interface AuthOSPluginOptions {
|
|
44
91
|
/**
|
|
45
92
|
* Base URL of the AuthOS API service.
|
|
@@ -92,6 +139,20 @@ interface AuthOSPluginOptions {
|
|
|
92
139
|
* @example '/onboarding'
|
|
93
140
|
*/
|
|
94
141
|
afterSignUpUrl?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Appearance customization options.
|
|
144
|
+
* Use to override default theme colors, fonts, and styling.
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* appearance: {
|
|
148
|
+
* variables: {
|
|
149
|
+
* colorPrimary: '#0066cc',
|
|
150
|
+
* borderRadius: '0.25rem',
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
appearance?: AppearanceOptions;
|
|
95
156
|
}
|
|
96
157
|
declare const AUTH_OS_INJECTION_KEY: unique symbol;
|
|
97
158
|
/**
|
|
@@ -340,6 +401,16 @@ declare const SignUp: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
340
401
|
type: PropType<(error: Error) => void>;
|
|
341
402
|
default: undefined;
|
|
342
403
|
};
|
|
404
|
+
/** Organization slug for tenant context */
|
|
405
|
+
orgSlug: {
|
|
406
|
+
type: StringConstructor;
|
|
407
|
+
default: undefined;
|
|
408
|
+
};
|
|
409
|
+
/** Service slug for tenant attribution (used with orgSlug) */
|
|
410
|
+
serviceSlug: {
|
|
411
|
+
type: StringConstructor;
|
|
412
|
+
default: undefined;
|
|
413
|
+
};
|
|
343
414
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
344
415
|
[key: string]: any;
|
|
345
416
|
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
@@ -353,12 +424,24 @@ declare const SignUp: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
353
424
|
type: PropType<(error: Error) => void>;
|
|
354
425
|
default: undefined;
|
|
355
426
|
};
|
|
427
|
+
/** Organization slug for tenant context */
|
|
428
|
+
orgSlug: {
|
|
429
|
+
type: StringConstructor;
|
|
430
|
+
default: undefined;
|
|
431
|
+
};
|
|
432
|
+
/** Service slug for tenant attribution (used with orgSlug) */
|
|
433
|
+
serviceSlug: {
|
|
434
|
+
type: StringConstructor;
|
|
435
|
+
default: undefined;
|
|
436
|
+
};
|
|
356
437
|
}>> & Readonly<{
|
|
357
438
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
358
439
|
onError?: ((...args: any[]) => any) | undefined;
|
|
359
440
|
}>, {
|
|
360
441
|
onSuccess: () => void;
|
|
361
442
|
onError: (error: Error) => void;
|
|
443
|
+
orgSlug: string;
|
|
444
|
+
serviceSlug: string;
|
|
362
445
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
363
446
|
|
|
364
447
|
interface OrganizationSwitcherSlotProps {
|
|
@@ -492,9 +575,9 @@ declare const OAuthButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
492
575
|
type: BooleanConstructor;
|
|
493
576
|
default: boolean;
|
|
494
577
|
};
|
|
495
|
-
}>, () =>
|
|
578
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
496
579
|
[key: string]: any;
|
|
497
|
-
}> |
|
|
580
|
+
}> | VNode<vue.RendererNode, vue.RendererElement, {
|
|
498
581
|
[key: string]: any;
|
|
499
582
|
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "redirect"[], "redirect", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
500
583
|
provider: {
|
|
@@ -638,4 +721,4 @@ declare const PasskeySignIn: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
638
721
|
showPasswordSignIn: boolean;
|
|
639
722
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
640
723
|
|
|
641
|
-
export { AUTH_OS_INJECTION_KEY, type AuthOSContext, type AuthOSPluginOptions, AuthOSProvider, type AuthOSState, MagicLinkSignIn, OAuthButton, type OAuthButtonSlotProps, OrganizationSwitcher, type OrganizationSwitcherSlotProps, PasskeySignIn, Protect, SignIn, type SignInSlotProps, SignUp, type SignUpSlotProps, SignedIn, SignedOut, type SupportedOAuthProvider, UserButton, type UserButtonSlotProps, createAuthOS, useAllPermissions, useAnyPermission, useAuthOS, useOrganization, usePermission, useUser };
|
|
724
|
+
export { AUTH_OS_INJECTION_KEY, type AppearanceOptions, type AppearanceVariables, type AuthOSContext, type AuthOSPluginOptions, AuthOSProvider, type AuthOSState, MagicLinkSignIn, OAuthButton, type OAuthButtonSlotProps, OrganizationSwitcher, type OrganizationSwitcherSlotProps, PasskeySignIn, Protect, SignIn, type SignInSlotProps, SignUp, type SignUpSlotProps, SignedIn, SignedOut, type SupportedOAuthProvider, UserButton, type UserButtonSlotProps, createAuthOS, useAllPermissions, useAnyPermission, useAuthOS, useOrganization, usePermission, useUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,53 @@ interface AuthOSContext {
|
|
|
40
40
|
* }));
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
+
/**
|
|
44
|
+
* Appearance variables for customizing the visual theme.
|
|
45
|
+
* All properties are optional and use CSS color/size values.
|
|
46
|
+
*/
|
|
47
|
+
interface AppearanceVariables {
|
|
48
|
+
/** Primary brand color (e.g., '#6366f1') */
|
|
49
|
+
colorPrimary?: string;
|
|
50
|
+
/** Primary color on hover */
|
|
51
|
+
colorPrimaryHover?: string;
|
|
52
|
+
/** Text color on primary background */
|
|
53
|
+
colorPrimaryForeground?: string;
|
|
54
|
+
/** Error/danger color */
|
|
55
|
+
colorDanger?: string;
|
|
56
|
+
/** Success color */
|
|
57
|
+
colorSuccess?: string;
|
|
58
|
+
/** Warning color */
|
|
59
|
+
colorWarning?: string;
|
|
60
|
+
/** Main background color */
|
|
61
|
+
colorBackground?: string;
|
|
62
|
+
/** Surface/card background color */
|
|
63
|
+
colorSurface?: string;
|
|
64
|
+
/** Main text color */
|
|
65
|
+
colorForeground?: string;
|
|
66
|
+
/** Muted/secondary text color */
|
|
67
|
+
colorMuted?: string;
|
|
68
|
+
/** Border color */
|
|
69
|
+
colorBorder?: string;
|
|
70
|
+
/** Input background color */
|
|
71
|
+
colorInput?: string;
|
|
72
|
+
/** Input border color */
|
|
73
|
+
colorInputBorder?: string;
|
|
74
|
+
/** Focus ring color */
|
|
75
|
+
colorRing?: string;
|
|
76
|
+
/** Font family */
|
|
77
|
+
fontFamily?: string;
|
|
78
|
+
/** Base font size */
|
|
79
|
+
fontSize?: string;
|
|
80
|
+
/** Border radius */
|
|
81
|
+
borderRadius?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Appearance configuration for customizing component styling.
|
|
85
|
+
*/
|
|
86
|
+
interface AppearanceOptions {
|
|
87
|
+
/** CSS variable overrides */
|
|
88
|
+
variables?: AppearanceVariables;
|
|
89
|
+
}
|
|
43
90
|
interface AuthOSPluginOptions {
|
|
44
91
|
/**
|
|
45
92
|
* Base URL of the AuthOS API service.
|
|
@@ -92,6 +139,20 @@ interface AuthOSPluginOptions {
|
|
|
92
139
|
* @example '/onboarding'
|
|
93
140
|
*/
|
|
94
141
|
afterSignUpUrl?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Appearance customization options.
|
|
144
|
+
* Use to override default theme colors, fonts, and styling.
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* appearance: {
|
|
148
|
+
* variables: {
|
|
149
|
+
* colorPrimary: '#0066cc',
|
|
150
|
+
* borderRadius: '0.25rem',
|
|
151
|
+
* }
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
appearance?: AppearanceOptions;
|
|
95
156
|
}
|
|
96
157
|
declare const AUTH_OS_INJECTION_KEY: unique symbol;
|
|
97
158
|
/**
|
|
@@ -340,6 +401,16 @@ declare const SignUp: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
340
401
|
type: PropType<(error: Error) => void>;
|
|
341
402
|
default: undefined;
|
|
342
403
|
};
|
|
404
|
+
/** Organization slug for tenant context */
|
|
405
|
+
orgSlug: {
|
|
406
|
+
type: StringConstructor;
|
|
407
|
+
default: undefined;
|
|
408
|
+
};
|
|
409
|
+
/** Service slug for tenant attribution (used with orgSlug) */
|
|
410
|
+
serviceSlug: {
|
|
411
|
+
type: StringConstructor;
|
|
412
|
+
default: undefined;
|
|
413
|
+
};
|
|
343
414
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
344
415
|
[key: string]: any;
|
|
345
416
|
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
@@ -353,12 +424,24 @@ declare const SignUp: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
353
424
|
type: PropType<(error: Error) => void>;
|
|
354
425
|
default: undefined;
|
|
355
426
|
};
|
|
427
|
+
/** Organization slug for tenant context */
|
|
428
|
+
orgSlug: {
|
|
429
|
+
type: StringConstructor;
|
|
430
|
+
default: undefined;
|
|
431
|
+
};
|
|
432
|
+
/** Service slug for tenant attribution (used with orgSlug) */
|
|
433
|
+
serviceSlug: {
|
|
434
|
+
type: StringConstructor;
|
|
435
|
+
default: undefined;
|
|
436
|
+
};
|
|
356
437
|
}>> & Readonly<{
|
|
357
438
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
358
439
|
onError?: ((...args: any[]) => any) | undefined;
|
|
359
440
|
}>, {
|
|
360
441
|
onSuccess: () => void;
|
|
361
442
|
onError: (error: Error) => void;
|
|
443
|
+
orgSlug: string;
|
|
444
|
+
serviceSlug: string;
|
|
362
445
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
363
446
|
|
|
364
447
|
interface OrganizationSwitcherSlotProps {
|
|
@@ -492,9 +575,9 @@ declare const OAuthButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
492
575
|
type: BooleanConstructor;
|
|
493
576
|
default: boolean;
|
|
494
577
|
};
|
|
495
|
-
}>, () =>
|
|
578
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
496
579
|
[key: string]: any;
|
|
497
|
-
}> |
|
|
580
|
+
}> | VNode<vue.RendererNode, vue.RendererElement, {
|
|
498
581
|
[key: string]: any;
|
|
499
582
|
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "redirect"[], "redirect", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
500
583
|
provider: {
|
|
@@ -638,4 +721,4 @@ declare const PasskeySignIn: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
638
721
|
showPasswordSignIn: boolean;
|
|
639
722
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
640
723
|
|
|
641
|
-
export { AUTH_OS_INJECTION_KEY, type AuthOSContext, type AuthOSPluginOptions, AuthOSProvider, type AuthOSState, MagicLinkSignIn, OAuthButton, type OAuthButtonSlotProps, OrganizationSwitcher, type OrganizationSwitcherSlotProps, PasskeySignIn, Protect, SignIn, type SignInSlotProps, SignUp, type SignUpSlotProps, SignedIn, SignedOut, type SupportedOAuthProvider, UserButton, type UserButtonSlotProps, createAuthOS, useAllPermissions, useAnyPermission, useAuthOS, useOrganization, usePermission, useUser };
|
|
724
|
+
export { AUTH_OS_INJECTION_KEY, type AppearanceOptions, type AppearanceVariables, type AuthOSContext, type AuthOSPluginOptions, AuthOSProvider, type AuthOSState, MagicLinkSignIn, OAuthButton, type OAuthButtonSlotProps, OrganizationSwitcher, type OrganizationSwitcherSlotProps, PasskeySignIn, Protect, SignIn, type SignInSlotProps, SignUp, type SignUpSlotProps, SignedIn, SignedOut, type SupportedOAuthProvider, UserButton, type UserButtonSlotProps, createAuthOS, useAllPermissions, useAnyPermission, useAuthOS, useOrganization, usePermission, useUser };
|