@drmhse/authos-cli 0.1.3 → 0.1.5

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/bin.js CHANGED
@@ -308,9 +308,13 @@ import { AuthErrorCodes } from "@drmhse/sso-sdk";
308
308
  interface LoginFormProps {
309
309
  onSuccess?: () => void;
310
310
  redirectTo?: string;
311
+ /** Organization slug for tenant-scoped login */
312
+ orgSlug?: string;
313
+ /** Service slug for service-scoped login (used with orgSlug) */
314
+ serviceSlug?: string;
311
315
  }
312
316
 
313
- export function LoginForm({ onSuccess, redirectTo }: LoginFormProps) {
317
+ export function LoginForm({ onSuccess, redirectTo, orgSlug, serviceSlug }: LoginFormProps) {
314
318
  const { client } = useAuthOS();
315
319
  const [email, setEmail] = useState("");
316
320
  const [password, setPassword] = useState("");
@@ -326,7 +330,7 @@ export function LoginForm({ onSuccess, redirectTo }: LoginFormProps) {
326
330
  setLoading(true);
327
331
 
328
332
  try {
329
- const response = await client.auth.login({ email, password });
333
+ const response = await client.auth.login({ email, password, org_slug: orgSlug, service_slug: serviceSlug });
330
334
 
331
335
  if (response.mfa_required) {
332
336
  setMfaRequired(true);
@@ -493,6 +497,10 @@ import { AuthErrorCodes } from "@drmhse/sso-sdk";
493
497
 
494
498
  interface Props {
495
499
  redirectTo?: string;
500
+ /** Organization slug for tenant-scoped login */
501
+ orgSlug?: string;
502
+ /** Service slug for service-scoped login (used with orgSlug) */
503
+ serviceSlug?: string;
496
504
  }
497
505
 
498
506
  const props = defineProps<Props>();
@@ -518,6 +526,8 @@ async function handleSubmit() {
518
526
  const response = await client.auth.login({
519
527
  email: email.value,
520
528
  password: password.value,
529
+ org_slug: props.orgSlug,
530
+ service_slug: props.serviceSlug,
521
531
  });
522
532
 
523
533
  if (response.mfa_required) {
package/dist/index.js CHANGED
@@ -307,9 +307,13 @@ import { AuthErrorCodes } from "@drmhse/sso-sdk";
307
307
  interface LoginFormProps {
308
308
  onSuccess?: () => void;
309
309
  redirectTo?: string;
310
+ /** Organization slug for tenant-scoped login */
311
+ orgSlug?: string;
312
+ /** Service slug for service-scoped login (used with orgSlug) */
313
+ serviceSlug?: string;
310
314
  }
311
315
 
312
- export function LoginForm({ onSuccess, redirectTo }: LoginFormProps) {
316
+ export function LoginForm({ onSuccess, redirectTo, orgSlug, serviceSlug }: LoginFormProps) {
313
317
  const { client } = useAuthOS();
314
318
  const [email, setEmail] = useState("");
315
319
  const [password, setPassword] = useState("");
@@ -325,7 +329,7 @@ export function LoginForm({ onSuccess, redirectTo }: LoginFormProps) {
325
329
  setLoading(true);
326
330
 
327
331
  try {
328
- const response = await client.auth.login({ email, password });
332
+ const response = await client.auth.login({ email, password, org_slug: orgSlug, service_slug: serviceSlug });
329
333
 
330
334
  if (response.mfa_required) {
331
335
  setMfaRequired(true);
@@ -492,6 +496,10 @@ import { AuthErrorCodes } from "@drmhse/sso-sdk";
492
496
 
493
497
  interface Props {
494
498
  redirectTo?: string;
499
+ /** Organization slug for tenant-scoped login */
500
+ orgSlug?: string;
501
+ /** Service slug for service-scoped login (used with orgSlug) */
502
+ serviceSlug?: string;
495
503
  }
496
504
 
497
505
  const props = defineProps<Props>();
@@ -517,6 +525,8 @@ async function handleSubmit() {
517
525
  const response = await client.auth.login({
518
526
  email: email.value,
519
527
  password: password.value,
528
+ org_slug: props.orgSlug,
529
+ service_slug: props.serviceSlug,
520
530
  });
521
531
 
522
532
  if (response.mfa_required) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drmhse/authos-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "CLI tool for scaffolding AuthOS integrations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",