delta-auth-next 0.1.31 → 0.1.32

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.
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
3
  className?: string;
4
- redirectUrl?: string;
4
+ preferredText?: string;
5
5
  }
6
- export declare const LoginButton: ({ className, redirectUrl, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const LoginButton: ({ className, preferredText, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export {};
8
8
  //# sourceMappingURL=LoginButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoginButton.d.ts","sourceRoot":"","sources":["../src/LoginButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,GAAI,sCAIzB,WAAW,4CAcb,CAAC"}
1
+ {"version":3,"file":"LoginButton.d.ts","sourceRoot":"","sources":["../src/LoginButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,GAAI,wCAIzB,WAAW,4CAcb,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const LoginButton = ({ className, redirectUrl = '/login', ...props }) => {
2
+ export const LoginButton = ({ className, preferredText = 'Log In', ...props }) => {
3
3
  const defaultClasses = 'px-6 py-2 rounded-lg bg-green-600 text-white font-semibold hover:bg-green-700 transition-all duration-300';
4
4
  return (_jsx("button", { className: `${defaultClasses} ${className || ''}`, onClick: () => {
5
- window.location.href = redirectUrl;
6
- }, ...props, children: "Log In" }));
5
+ window.location.href = "/api/login";
6
+ }, ...props, children: preferredText }));
7
7
  };
8
8
  //# sourceMappingURL=LoginButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoginButton.js","sourceRoot":"","sources":["../src/LoginButton.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,SAAS,EACT,WAAW,GAAG,QAAQ,EACtB,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,cAAc,GAClB,2GAA2G,CAAC;IAC9G,OAAO,CACL,iBACE,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,IAAI,EAAE,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QACrC,CAAC,KACG,KAAK,uBAGF,CACV,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"LoginButton.js","sourceRoot":"","sources":["../src/LoginButton.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,SAAS,EACT,aAAa,GAAG,QAAQ,EACxB,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,cAAc,GAClB,2GAA2G,CAAC;IAC9G,OAAO,CACL,iBACE,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,IAAI,EAAE,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,YAAY,CAAC;QACtC,CAAC,KACG,KAAK,YAER,aAAa,GACP,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ className?: string;
4
+ preferredText?: string;
5
+ }
6
+ export declare const LogoutAllSessionsButton: ({ className, preferredText, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=LogoutAllSessionsButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoutAllSessionsButton.d.ts","sourceRoot":"","sources":["../src/LogoutAllSessionsButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,GAAI,wCAIrC,WAAW,4CAcb,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const LogoutAllSessionsButton = ({ className, preferredText = 'Log out all sessions', ...props }) => {
3
+ const defaultClasses = 'px-6 py-2 rounded-lg bg-green-600 text-white font-semibold hover:bg-green-700 transition-all duration-300';
4
+ return (_jsx("button", { className: `${defaultClasses} ${className || ''}`, onClick: () => {
5
+ window.location.href = '/api/logoutallsessions';
6
+ }, ...props, children: preferredText }));
7
+ };
8
+ //# sourceMappingURL=LogoutAllSessionsButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoutAllSessionsButton.js","sourceRoot":"","sources":["../src/LogoutAllSessionsButton.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,SAAS,EACT,aAAa,GAAG,sBAAsB,EACtC,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,cAAc,GAClB,2GAA2G,CAAC;IAC9G,OAAO,CACL,iBACE,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,IAAI,EAAE,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,wBAAwB,CAAC;QAClD,CAAC,KACG,KAAK,YAER,aAAa,GACP,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
3
  className?: string;
4
- redirectUrl?: string;
4
+ preferredText?: string;
5
5
  }
6
- export declare const LogoutButton: ({ className, redirectUrl, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const LogoutButton: ({ className, preferredText, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export {};
8
8
  //# sourceMappingURL=LogoutButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogoutButton.d.ts","sourceRoot":"","sources":["../src/LogoutButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,GAAI,sCAI1B,WAAW,4CAcb,CAAC"}
1
+ {"version":3,"file":"LogoutButton.d.ts","sourceRoot":"","sources":["../src/LogoutButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,GAAI,wCAI1B,WAAW,4CAcb,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const LogoutButton = ({ className, redirectUrl = '/', ...props }) => {
2
+ export const LogoutButton = ({ className, preferredText = 'Log out', ...props }) => {
3
3
  const defaultClasses = 'px-6 py-2 rounded-lg bg-green-600 text-white font-semibold hover:bg-green-700 transition-all duration-300';
4
4
  return (_jsx("button", { className: `${defaultClasses} ${className || ''}`, onClick: () => {
5
- window.location.href = redirectUrl;
6
- }, ...props, children: "Log Out" }));
5
+ window.location.href = '/api/logout';
6
+ }, ...props, children: preferredText }));
7
7
  };
8
8
  //# sourceMappingURL=LogoutButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogoutButton.js","sourceRoot":"","sources":["../src/LogoutButton.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,SAAS,EACT,WAAW,GAAG,GAAG,EACjB,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,cAAc,GAClB,2GAA2G,CAAC;IAC9G,OAAO,CACL,iBACE,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,IAAI,EAAE,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QACrC,CAAC,KACG,KAAK,wBAGF,CACV,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"LogoutButton.js","sourceRoot":"","sources":["../src/LogoutButton.tsx"],"names":[],"mappings":";AAQA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,SAAS,EACT,aAAa,GAAG,SAAS,EACzB,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,cAAc,GAClB,2GAA2G,CAAC;IAC9G,OAAO,CACL,iBACE,SAAS,EAAE,GAAG,cAAc,IAAI,SAAS,IAAI,EAAE,EAAE,EACjD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,aAAa,CAAC;QACvC,CAAC,KACG,KAAK,YAER,aAAa,GACP,CACV,CAAC;AACJ,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,4 +4,9 @@ export * from './hooks';
4
4
  export * from './alert';
5
5
  export * from './types';
6
6
  export * from './urls';
7
+ export * from './LoginButton';
8
+ export * from './LogoutButton';
9
+ export * from './LogoutAllSessionsButton';
10
+ export * from './ProtectedRoute';
11
+ export * from './UserProfile';
7
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -4,4 +4,10 @@ export * from './hooks';
4
4
  export * from './alert';
5
5
  export * from './types';
6
6
  export * from './urls';
7
+ export * from './LoginButton';
8
+ // export * from './SignInButton';
9
+ export * from './LogoutButton';
10
+ export * from './LogoutAllSessionsButton';
11
+ export * from './ProtectedRoute';
12
+ export * from './UserProfile';
7
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,kCAAkC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delta-auth-next",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "A lightweight authentication helper for Next.js that provides React context providers and Edge-safe middleware utilities for handling sign-in redirects and session management.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Onwodi",