@ttoss/react-auth 1.7.5 → 1.7.6
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/README.md +4 -0
- package/package.json +8 -5
- package/dist/index.d.mts +0 -58
- package/dist/index.js +0 -1389
package/README.md
CHANGED
|
@@ -8,6 +8,10 @@ This module is intended to use with AWS Cognito. It uses [AWS Amplify](https://d
|
|
|
8
8
|
|
|
9
9
|
[Amplify Auth configuration](https://docs.amplify.aws/lib/auth/start/q/platform/js#re-use-existing-authentication-resource) must be provided in your App to make Auth Module works properly.
|
|
10
10
|
|
|
11
|
+
### ESM Only
|
|
12
|
+
|
|
13
|
+
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
|
|
14
|
+
|
|
11
15
|
## Getting Started
|
|
12
16
|
|
|
13
17
|
### Install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-auth",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "ttoss authentication module for React apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"url": "https://github.com/ttoss/ttoss.git",
|
|
13
13
|
"directory": "packages/react-auth"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": "./dist/esm/index.js",
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
19
|
"i18n",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"aws-amplify": "^5.0.0",
|
|
31
31
|
"react": ">=16.8.0",
|
|
32
32
|
"@ttoss/react-i18n": "^1.25.0",
|
|
33
|
-
"@ttoss/react-notifications": "^1.24.
|
|
33
|
+
"@ttoss/react-notifications": "^1.24.13",
|
|
34
34
|
"@ttoss/ui": "^3.1.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@ttoss/config": "^1.31.0",
|
|
43
43
|
"@ttoss/i18n-cli": "^0.7.0",
|
|
44
44
|
"@ttoss/react-i18n": "^1.25.0",
|
|
45
|
-
"@ttoss/react-notifications": "^1.24.
|
|
45
|
+
"@ttoss/react-notifications": "^1.24.13",
|
|
46
46
|
"@ttoss/test-utils": "^1.24.0",
|
|
47
47
|
"@ttoss/ui": "^3.1.6"
|
|
48
48
|
},
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
"React",
|
|
51
51
|
"authentication"
|
|
52
52
|
],
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=16"
|
|
55
|
+
},
|
|
53
56
|
"publishConfig": {
|
|
54
57
|
"access": "public",
|
|
55
58
|
"provenance": true
|
package/dist/index.d.mts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
type User = {
|
|
5
|
-
id: string;
|
|
6
|
-
email: string;
|
|
7
|
-
emailVerified: string;
|
|
8
|
-
} | null;
|
|
9
|
-
type Tokens = {
|
|
10
|
-
idToken: string;
|
|
11
|
-
accessToken: string;
|
|
12
|
-
refreshToken: string;
|
|
13
|
-
} | null;
|
|
14
|
-
declare const AuthProvider: ({ children }: {
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
}) => react_jsx_runtime.JSX.Element | null;
|
|
17
|
-
declare const useAuth: () => {
|
|
18
|
-
signOut: () => Promise<any>;
|
|
19
|
-
isAuthenticated: boolean;
|
|
20
|
-
user: User;
|
|
21
|
-
tokens: Tokens;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
type LogoContextProps = {
|
|
25
|
-
logo?: React.ReactNode;
|
|
26
|
-
children?: React.ReactNode;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
type AuthProps = LogoContextProps & {
|
|
30
|
-
fullScreen?: boolean;
|
|
31
|
-
};
|
|
32
|
-
declare const Auth: ({ logo, fullScreen }: AuthProps) => react_jsx_runtime.JSX.Element;
|
|
33
|
-
|
|
34
|
-
type OnSignInInput = {
|
|
35
|
-
email: string;
|
|
36
|
-
password: string;
|
|
37
|
-
};
|
|
38
|
-
type OnSignIn = (input: OnSignInInput) => void;
|
|
39
|
-
type OnSignUpInput = {
|
|
40
|
-
email: string;
|
|
41
|
-
password: string;
|
|
42
|
-
confirmPassword: string;
|
|
43
|
-
};
|
|
44
|
-
type OnSignUp = (input: OnSignUpInput) => void;
|
|
45
|
-
type OnConfirmSignUp = (input: {
|
|
46
|
-
email: string;
|
|
47
|
-
code: string;
|
|
48
|
-
}) => void;
|
|
49
|
-
type OnForgotPassword = (input: {
|
|
50
|
-
email: string;
|
|
51
|
-
}) => void;
|
|
52
|
-
type OnForgotPasswordResetPassword = (input: {
|
|
53
|
-
email: string;
|
|
54
|
-
code: string;
|
|
55
|
-
newPassword: string;
|
|
56
|
-
}) => void;
|
|
57
|
-
|
|
58
|
-
export { Auth, AuthProvider, OnConfirmSignUp, OnForgotPassword, OnForgotPasswordResetPassword, OnSignIn, OnSignInInput, OnSignUp, OnSignUpInput, useAuth };
|