@bananacool467/authtics 1.0.30 → 1.0.40
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/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const getAccount: (accessToken: string, clientId: string, clientSecret: string, userIp: string) => Promise<any>;
|
|
11
11
|
export declare const authtics: {
|
|
12
|
-
useAccount: () =>
|
|
12
|
+
useAccount: () => any[];
|
|
13
13
|
use: (clientId: string, clientSecret: string, flow: boolean) => any[];
|
|
14
14
|
};
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.authtics = exports.getAccount = void 0;
|
|
18
18
|
const child_process_1 = require("child_process");
|
|
19
|
-
const
|
|
19
|
+
const react = require("react");
|
|
20
20
|
const cookieParser = require("cookie-parser");
|
|
21
21
|
const __runCurl__ = (url_1, ...args_1) => __awaiter(void 0, [url_1, ...args_1], void 0, function* (url, headers = []) {
|
|
22
22
|
var outp;
|
|
@@ -47,8 +47,8 @@ const getAccount = (accessToken, clientId, clientSecret, userIp) => __awaiter(vo
|
|
|
47
47
|
exports.getAccount = getAccount;
|
|
48
48
|
exports.authtics = {
|
|
49
49
|
useAccount: () => {
|
|
50
|
-
const [account, setAccount] =
|
|
51
|
-
|
|
50
|
+
const [account, setAccount] = react.useState({});
|
|
51
|
+
react.useEffect(() => {
|
|
52
52
|
const getAccount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
53
|
const a = yield fetch('/api/authtics-integration/get-account', {
|
|
54
54
|
method: 'POST',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bananacool467/authtics",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "Use Authtics (An Auth service) to add accounts to your site like Auth0! (This is currently underdevelopment. Issues are expected.)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,11 +15,14 @@
|
|
|
15
15
|
"author": "bananacool467",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@bananacool467/authtics": "^1.0.1",
|
|
19
18
|
"@types/node": "^22.13.11",
|
|
20
19
|
"cookie-parser": "^1.4.7",
|
|
21
20
|
"react-cookie": "^8.0.1"
|
|
22
21
|
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
24
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
25
|
+
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@types/react": "^19.2.13",
|
|
25
28
|
"@types/react-dom": "^19.2.3",
|