tinacms-authjs 24.0.2 → 24.0.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.
- package/dist/constants.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -11
- package/dist/tinacms.d.ts +2 -1
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TINA_CREDENTIALS_PROVIDER_NAME = "TinaCredentials";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuthOptions } from 'next-auth';
|
|
2
1
|
import type { BackendAuthProvider } from '@tinacms/datalayer';
|
|
2
|
+
import { AuthOptions } from 'next-auth';
|
|
3
3
|
declare const TinaAuthJSOptions: ({ databaseClient, uidProp, debug, overrides, secret, providers, }: {
|
|
4
4
|
databaseClient: any;
|
|
5
5
|
uidProp?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import
|
|
3
|
-
import CredentialsProvider from "next-auth/providers/credentials";
|
|
2
|
+
import NextAuthImport from "next-auth";
|
|
4
3
|
import { getServerSession } from "next-auth/next";
|
|
4
|
+
import CredentialsImport from "next-auth/providers/credentials";
|
|
5
5
|
|
|
6
|
-
// src/
|
|
7
|
-
import {
|
|
8
|
-
getCsrfToken,
|
|
9
|
-
getSession,
|
|
10
|
-
signIn,
|
|
11
|
-
signOut,
|
|
12
|
-
SessionProvider
|
|
13
|
-
} from "next-auth/react";
|
|
14
|
-
import { AbstractAuthProvider } from "tinacms";
|
|
6
|
+
// src/constants.ts
|
|
15
7
|
var TINA_CREDENTIALS_PROVIDER_NAME = "TinaCredentials";
|
|
16
8
|
|
|
17
9
|
// src/index.ts
|
|
10
|
+
var interopDefault = (mod) => mod.default ?? mod;
|
|
11
|
+
var NextAuth = interopDefault(NextAuthImport);
|
|
12
|
+
var CredentialsProvider = interopDefault(CredentialsImport);
|
|
18
13
|
var authenticate = async (databaseClient, username, password) => {
|
|
19
14
|
try {
|
|
20
15
|
const result = await databaseClient.authenticate({ username, password });
|
package/dist/tinacms.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Collection, LoginStrategy } from '@tinacms/schema-tools';
|
|
2
2
|
import { AbstractAuthProvider } from 'tinacms';
|
|
3
3
|
import type { FC } from 'react';
|
|
4
|
-
|
|
4
|
+
import { TINA_CREDENTIALS_PROVIDER_NAME } from './constants';
|
|
5
|
+
export { TINA_CREDENTIALS_PROVIDER_NAME };
|
|
5
6
|
export declare class DefaultAuthJSProvider extends AbstractAuthProvider {
|
|
6
7
|
readonly callbackUrl: string;
|
|
7
8
|
readonly name: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms-authjs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "24.0.
|
|
4
|
+
"version": "24.0.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tinacms/schema-tools": "^2.
|
|
22
|
+
"@tinacms/schema-tools": "^2.9.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"next": "^15.5.16",
|
|
26
|
-
"next-auth": "^4.24.
|
|
26
|
+
"next-auth": "^4.24.15",
|
|
27
27
|
"react": "^19.2.3",
|
|
28
28
|
"typescript": "^5.7.3",
|
|
29
|
+
"@tinacms/scripts": "1.6.4",
|
|
29
30
|
"@tinacms/datalayer": "2.0.29",
|
|
30
|
-
"
|
|
31
|
-
"tinacms": "3.11.0"
|
|
31
|
+
"tinacms": "3.12.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"next": "^12.2.5 || ^13 || ^14 || ^15",
|
|
35
35
|
"next-auth": "^4.22.1",
|
|
36
36
|
"react": "^17.0.2 || ^18 || ^19",
|
|
37
37
|
"react-dom": "^17.0.2 || ^18 || ^19",
|
|
38
|
-
"tinacms": "^3.
|
|
38
|
+
"tinacms": "^3.12.1"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"registry": "https://registry.npmjs.org"
|