authtara-sdk 1.1.19 → 1.1.20

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/react.d.mts CHANGED
@@ -45,7 +45,6 @@ interface AuthTaraAuthProps {
45
45
  /** Display mode: 'modal' for popup, 'redirect' for full page redirect */
46
46
  mode?: 'modal' | 'redirect';
47
47
  /** Initial auth mode: 'oauth' for social buttons, 'credentials' for email/password */
48
- initialAuthMode?: AuthMode;
49
48
  /** Show email/password option */
50
49
  showCredentials?: boolean;
51
50
  /** Appearance customization */
@@ -64,9 +63,9 @@ interface AuthTaraAuthProps {
64
63
  /** Custom API URL for credentials login (defaults to /api/auth/login) */
65
64
  credentialsApiUrl?: string;
66
65
  /** Custom API URL for registration (defaults to /api/auth/register) */
67
- registerApiUrl?: string;
66
+ signupUrl?: string;
68
67
  }
69
- declare function AuthTaraAuth({ showCredentials, appearance, redirectUrl, onSuccess, onError, credentialsApiUrl, }: AuthTaraAuthProps): react_jsx_runtime.JSX.Element;
68
+ declare function AuthTaraAuth({ showCredentials, appearance, redirectUrl, onSuccess, onError, credentialsApiUrl, signupUrl, }: AuthTaraAuthProps): react_jsx_runtime.JSX.Element;
70
69
 
71
70
  interface AuthTaraBillingProps {
72
71
  tenantId: string;
package/dist/react.d.ts CHANGED
@@ -45,7 +45,6 @@ interface AuthTaraAuthProps {
45
45
  /** Display mode: 'modal' for popup, 'redirect' for full page redirect */
46
46
  mode?: 'modal' | 'redirect';
47
47
  /** Initial auth mode: 'oauth' for social buttons, 'credentials' for email/password */
48
- initialAuthMode?: AuthMode;
49
48
  /** Show email/password option */
50
49
  showCredentials?: boolean;
51
50
  /** Appearance customization */
@@ -64,9 +63,9 @@ interface AuthTaraAuthProps {
64
63
  /** Custom API URL for credentials login (defaults to /api/auth/login) */
65
64
  credentialsApiUrl?: string;
66
65
  /** Custom API URL for registration (defaults to /api/auth/register) */
67
- registerApiUrl?: string;
66
+ signupUrl?: string;
68
67
  }
69
- declare function AuthTaraAuth({ showCredentials, appearance, redirectUrl, onSuccess, onError, credentialsApiUrl, }: AuthTaraAuthProps): react_jsx_runtime.JSX.Element;
68
+ declare function AuthTaraAuth({ showCredentials, appearance, redirectUrl, onSuccess, onError, credentialsApiUrl, signupUrl, }: AuthTaraAuthProps): react_jsx_runtime.JSX.Element;
70
69
 
71
70
  interface AuthTaraBillingProps {
72
71
  tenantId: string;
package/dist/react.js CHANGED
@@ -267,13 +267,13 @@ function useAuth() {
267
267
  var React2 = __toESM(require("react"));
268
268
  var import_jsx_runtime2 = require("react/jsx-runtime");
269
269
  function AuthTaraAuth({
270
- // mode = 'modal', // Reserved for future use
271
270
  showCredentials = true,
272
271
  appearance,
273
272
  redirectUrl = "/dashboard",
274
273
  onSuccess,
275
274
  onError,
276
- credentialsApiUrl = "/api/auth/login"
275
+ credentialsApiUrl = "/api/auth/login",
276
+ signupUrl = "/register"
277
277
  }) {
278
278
  const { signIn, isLoading: oauthLoading, user } = useAuth();
279
279
  const [error, setError] = React2.useState(null);
@@ -573,7 +573,7 @@ function AuthTaraAuth({
573
573
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
574
574
  "a",
575
575
  {
576
- href: "#signup",
576
+ href: signupUrl,
577
577
  style: {
578
578
  color: textColor,
579
579
  textDecoration: "underline",
package/dist/react.mjs CHANGED
@@ -231,13 +231,13 @@ function useAuth() {
231
231
  import * as React2 from "react";
232
232
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
233
233
  function AuthTaraAuth({
234
- // mode = 'modal', // Reserved for future use
235
234
  showCredentials = true,
236
235
  appearance,
237
236
  redirectUrl = "/dashboard",
238
237
  onSuccess,
239
238
  onError,
240
- credentialsApiUrl = "/api/auth/login"
239
+ credentialsApiUrl = "/api/auth/login",
240
+ signupUrl = "/register"
241
241
  }) {
242
242
  const { signIn, isLoading: oauthLoading, user } = useAuth();
243
243
  const [error, setError] = React2.useState(null);
@@ -537,7 +537,7 @@ function AuthTaraAuth({
537
537
  /* @__PURE__ */ jsx2(
538
538
  "a",
539
539
  {
540
- href: "#signup",
540
+ href: signupUrl,
541
541
  style: {
542
542
  color: textColor,
543
543
  textDecoration: "underline",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authtara-sdk",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "SDK Client untuk integrasi dengan DigitalSolution Platform - SSO, Billing, dan Metering",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",