next-auth-heksso 1.0.4 → 1.0.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.
|
@@ -5,4 +5,4 @@ import { NextApiRequest, NextApiResponse } from "next";
|
|
|
5
5
|
* @param res NextApiRequest
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export declare function federatedLogout(req: NextApiRequest, res: NextApiResponse): Promise<NextApiResponse<any> | undefined>;
|
|
@@ -32,6 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.federatedLogout = void 0;
|
|
35
36
|
const jwt = __importStar(require("next-auth/jwt"));
|
|
36
37
|
/**
|
|
37
38
|
* Provides a next api route for performing a federated logout of the user (logs ouf of keycloak)
|
|
@@ -66,4 +67,4 @@ function federatedLogout(req, res) {
|
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
|
-
exports.
|
|
70
|
+
exports.federatedLogout = federatedLogout;
|
|
@@ -13,7 +13,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.authOptions = void 0;
|
|
16
|
-
const next_auth_1 = __importDefault(require("next-auth"));
|
|
17
16
|
const keycloak_1 = __importDefault(require("next-auth/providers/keycloak"));
|
|
18
17
|
const refreshAccessToken_1 = require("./refreshAccessToken");
|
|
19
18
|
/**
|
|
@@ -71,4 +70,3 @@ exports.authOptions = {
|
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
};
|
|
74
|
-
exports.default = (0, next_auth_1.default)(exports.authOptions);
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import * as jwt from "next-auth/jwt"
|
|
|
8
8
|
* @param res NextApiRequest
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export async function federatedLogout(req: NextApiRequest, res: NextApiResponse) {
|
|
12
12
|
try {
|
|
13
13
|
const token = await jwt.getToken({ req, secret: process.env.NEXTAUTH_SECRET })
|
|
14
14
|
if (!token) {
|