@workos-inc/authkit-nextjs 0.12.2 → 0.12.3

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,5 +1,6 @@
1
1
  import { updateSession } from './session.js';
2
- export function authkitMiddleware({ debug = false, middlewareAuth = { enabled: false, unauthenticatedPaths: [] }, redirectUri = '', } = {}) {
2
+ import { WORKOS_REDIRECT_URI } from './env-variables.js';
3
+ export function authkitMiddleware({ debug = false, middlewareAuth = { enabled: false, unauthenticatedPaths: [] }, redirectUri = WORKOS_REDIRECT_URI, } = {}) {
3
4
  return function (request) {
4
5
  return updateSession(request, debug, middlewareAuth, redirectUri);
5
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/middleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,GAAG,KAAK,EACb,cAAc,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,EAC7D,WAAW,GAAG,EAAE,MACY,EAAE;IAC9B,OAAO,UAAU,OAAO;QACtB,OAAO,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/middleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,GAAG,KAAK,EACb,cAAc,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,EAC7D,WAAW,GAAG,mBAAmB,MACL,EAAE;IAC9B,OAAO,UAAU,OAAO;QACtB,OAAO,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { WorkOS } from '@workos-inc/node';
2
- export declare const VERSION = "0.12.2";
2
+ export declare const VERSION = "0.12.3";
3
3
  declare const workos: WorkOS;
4
4
  export { workos };
@@ -1,6 +1,6 @@
1
1
  import { WorkOS } from '@workos-inc/node';
2
2
  import { WORKOS_API_HOSTNAME, WORKOS_API_KEY, WORKOS_API_HTTPS, WORKOS_API_PORT } from './env-variables.js';
3
- export const VERSION = '0.12.2';
3
+ export const VERSION = '0.12.3';
4
4
  const options = {
5
5
  apiHostname: WORKOS_API_HOSTNAME,
6
6
  https: WORKOS_API_HTTPS ? WORKOS_API_HTTPS === 'true' : true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos-inc/authkit-nextjs",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "Authentication and session helpers for using WorkOS & AuthKit with Next.js",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -21,7 +21,7 @@
21
21
  "test": "echo \"Error: no test specified\" && exit 1"
22
22
  },
23
23
  "dependencies": {
24
- "@workos-inc/node": "7.27.4",
24
+ "@workos-inc/node": "^7.27.5",
25
25
  "iron-session": "^8.0.1",
26
26
  "jose": "^5.2.3",
27
27
  "path-to-regexp": "^6.2.2"
package/src/middleware.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { NextMiddleware } from 'next/server';
2
2
  import { updateSession } from './session.js';
3
3
  import { AuthkitMiddlewareOptions } from './interfaces.js';
4
+ import { WORKOS_REDIRECT_URI } from './env-variables.js';
4
5
 
5
6
  export function authkitMiddleware({
6
7
  debug = false,
7
8
  middlewareAuth = { enabled: false, unauthenticatedPaths: [] },
8
- redirectUri = '',
9
+ redirectUri = WORKOS_REDIRECT_URI,
9
10
  }: AuthkitMiddlewareOptions = {}): NextMiddleware {
10
11
  return function (request) {
11
12
  return updateSession(request, debug, middlewareAuth, redirectUri);
package/src/workos.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { WorkOS } from '@workos-inc/node';
2
2
  import { WORKOS_API_HOSTNAME, WORKOS_API_KEY, WORKOS_API_HTTPS, WORKOS_API_PORT } from './env-variables.js';
3
3
 
4
- export const VERSION = '0.12.2';
4
+ export const VERSION = '0.12.3';
5
5
 
6
6
  const options = {
7
7
  apiHostname: WORKOS_API_HOSTNAME,