tinacms-authjs 0.0.0-c8b1d84-20241003015733 → 0.0.0-c965b5f-20250426163441
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 -27
- package/dist/index.js +7 -4
- package/dist/tinacms.d.ts +1 -32
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { BackendAuthProvider } from '@tinacms/datalayer';
|
|
3
|
-
declare const TinaAuthJSOptions: ({ databaseClient, uidProp, debug, overrides, secret, providers, }: {
|
|
4
|
-
databaseClient: any;
|
|
5
|
-
uidProp?: string;
|
|
6
|
-
debug?: boolean;
|
|
7
|
-
overrides?: AuthOptions;
|
|
8
|
-
providers?: AuthOptions["providers"];
|
|
9
|
-
secret: string;
|
|
10
|
-
}) => AuthOptions;
|
|
11
|
-
declare const TinaCredentialsProvider: ({ databaseClient, name, }: {
|
|
12
|
-
databaseClient: any;
|
|
13
|
-
name?: string;
|
|
14
|
-
}) => import("next-auth/providers/credentials").CredentialsConfig<{
|
|
15
|
-
username: {
|
|
16
|
-
label: string;
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
password: {
|
|
20
|
-
label: string;
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
declare const AuthJsBackendAuthProvider: ({ authOptions, }: {
|
|
25
|
-
authOptions: AuthOptions;
|
|
26
|
-
}) => BackendAuthProvider;
|
|
27
|
-
export { TinaCredentialsProvider, TinaAuthJSOptions, AuthJsBackendAuthProvider };
|
|
1
|
+
export * from "../src/index"
|
package/dist/index.js
CHANGED
|
@@ -17,19 +17,23 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
23
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
28
|
|
|
25
29
|
// src/index.ts
|
|
26
|
-
var
|
|
27
|
-
__export(
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
28
32
|
AuthJsBackendAuthProvider: () => AuthJsBackendAuthProvider,
|
|
29
33
|
TinaAuthJSOptions: () => TinaAuthJSOptions,
|
|
30
34
|
TinaCredentialsProvider: () => TinaCredentialsProvider
|
|
31
35
|
});
|
|
32
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
33
37
|
var import_next_auth = __toESM(require("next-auth"));
|
|
34
38
|
var import_credentials = __toESM(require("next-auth/providers/credentials"));
|
|
35
39
|
var import_next = require("next-auth/next");
|
|
@@ -84,7 +88,6 @@ var TinaAuthJSOptions = ({
|
|
|
84
88
|
return jwt;
|
|
85
89
|
},
|
|
86
90
|
session: async ({ session, token: jwt }) => {
|
|
87
|
-
;
|
|
88
91
|
session.user.role = jwt.role;
|
|
89
92
|
session.user.passwordChangeRequired = jwt.passwordChangeRequired;
|
|
90
93
|
session.user[uidProp] = jwt[uidProp];
|
package/dist/tinacms.d.ts
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { AbstractAuthProvider } from 'tinacms';
|
|
3
|
-
import type { FC } from 'react';
|
|
4
|
-
export declare const TINA_CREDENTIALS_PROVIDER_NAME = "TinaCredentials";
|
|
5
|
-
export declare class DefaultAuthJSProvider extends AbstractAuthProvider {
|
|
6
|
-
readonly callbackUrl: string;
|
|
7
|
-
readonly name: string;
|
|
8
|
-
readonly redirect: boolean;
|
|
9
|
-
constructor(props?: {
|
|
10
|
-
name?: string;
|
|
11
|
-
callbackUrl?: string;
|
|
12
|
-
redirect?: boolean;
|
|
13
|
-
});
|
|
14
|
-
authenticate(_props: any): Promise<any>;
|
|
15
|
-
getToken(): Promise<{
|
|
16
|
-
id_token: string;
|
|
17
|
-
}>;
|
|
18
|
-
getUser(): Promise<false | {
|
|
19
|
-
name?: string | null;
|
|
20
|
-
email?: string | null;
|
|
21
|
-
image?: string | null;
|
|
22
|
-
}>;
|
|
23
|
-
logout(): Promise<void>;
|
|
24
|
-
authorize(context?: any): Promise<any>;
|
|
25
|
-
getSessionProvider(): FC;
|
|
26
|
-
}
|
|
27
|
-
export type SignInErrorTypes = 'Signin' | 'OAuthSignin' | 'OAuthCallback' | 'OAuthCreateAccount' | 'EmailCreateAccount' | 'Callback' | 'OAuthAccountNotLinked' | 'EmailSignin' | 'CredentialsSignin' | 'SessionRequired' | 'default';
|
|
28
|
-
export declare class UsernamePasswordAuthJSProvider extends DefaultAuthJSProvider {
|
|
29
|
-
authenticate(props?: Record<string, any>): Promise<void>;
|
|
30
|
-
getLoginStrategy(): LoginStrategy;
|
|
31
|
-
}
|
|
32
|
-
export declare const TinaUserCollection: Collection;
|
|
1
|
+
export * from "../src/tinacms"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms-authjs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-c965b5f-20250426163441",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tinacms/schema-tools": "0.0.0-
|
|
21
|
+
"@tinacms/schema-tools": "0.0.0-c965b5f-20250426163441"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"next": "14.2.10",
|
|
25
25
|
"next-auth": "4.24.7",
|
|
26
26
|
"react": "^18.3.1",
|
|
27
27
|
"react-dom": "^18.3.1",
|
|
28
|
-
"typescript": "^5.
|
|
29
|
-
"@tinacms/
|
|
30
|
-
"@tinacms/
|
|
31
|
-
"tinacms": "0.0.0-
|
|
28
|
+
"typescript": "^5.7.3",
|
|
29
|
+
"@tinacms/scripts": "1.3.4",
|
|
30
|
+
"@tinacms/datalayer": "0.0.0-c965b5f-20250426163441",
|
|
31
|
+
"tinacms": "0.0.0-c965b5f-20250426163441"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"next": "^12.2.5 || ^13 || ^14",
|
|
35
35
|
"next-auth": "^4.22.1",
|
|
36
36
|
"react": "^17.0.2 || ^18",
|
|
37
37
|
"react-dom": "^17.0.2 || ^18",
|
|
38
|
-
"tinacms": "0.0.0-
|
|
38
|
+
"tinacms": "0.0.0-c965b5f-20250426163441"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"registry": "https://registry.npmjs.org"
|