authscape 1.0.5 → 1.0.8
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/package.json +28 -27
- package/services/authorizationComponent.js +1 -8
- package/{pages/signin-oidc.js → services/signInValidator.js} +5 -19
- package/pages/authentication/login.js +0 -23
- package/pages/authentication/logout.js +0 -18
- package/pages/authentication/signup.js +0 -18
- package/pages/signout-oidc.js +0 -23
package/package.json
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "authscape",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"@emotion/
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@stripe/stripe-js": "^1.
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"next
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"react
|
|
25
|
-
"react-
|
|
26
|
-
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "authscape",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"author": "zuechb",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@emotion/react": "^11.9.3",
|
|
14
|
+
"@emotion/styled": "^11.9.3",
|
|
15
|
+
"@mui/material": "^5.8.5",
|
|
16
|
+
"@stripe/react-stripe-js": "^1.9.0",
|
|
17
|
+
"@stripe/stripe-js": "^1.32.0",
|
|
18
|
+
"axios": "^0.27.2",
|
|
19
|
+
"js-file-download": "^0.4.12",
|
|
20
|
+
"next": "^12.1.6",
|
|
21
|
+
"next-cookies": "^2.0.3",
|
|
22
|
+
"nookies": "^2.5.2",
|
|
23
|
+
"querystring": "^0.2.1",
|
|
24
|
+
"react": "^18.2.0",
|
|
25
|
+
"react-data-table-component": "^7.5.2",
|
|
26
|
+
"react-dom": "^18.2.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useRouter } from 'next/router';
|
|
3
2
|
import axios from 'axios';
|
|
4
3
|
import querystring from "querystring";
|
|
5
|
-
import {
|
|
4
|
+
import { setCookie } from 'nookies';
|
|
6
5
|
|
|
7
|
-
export default function
|
|
8
|
-
|
|
9
|
-
const router = useRouter();
|
|
10
|
-
useEffect(async () => {
|
|
11
|
-
if(!router.isReady) return;
|
|
12
|
-
|
|
13
|
-
let codeVerifier = window.localStorage.getItem("verifier");
|
|
6
|
+
export default function signInValidator() {
|
|
7
|
+
let codeVerifier = window.localStorage.getItem("verifier");
|
|
14
8
|
if (router.query.code != null && codeVerifier != null)
|
|
15
9
|
{
|
|
16
10
|
const headers = {'Content-Type': 'application/x-www-form-urlencoded'}
|
|
@@ -67,13 +61,5 @@ export default function SigninOidc() {
|
|
|
67
61
|
{
|
|
68
62
|
window.location.href = "/";
|
|
69
63
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}, [router.isReady]);
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<div>
|
|
76
|
-
Redirecting...
|
|
77
|
-
</div>
|
|
78
|
-
)
|
|
79
|
-
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useRouter } from 'next/router';
|
|
3
|
-
import authService from '../../services/authService';
|
|
4
|
-
|
|
5
|
-
export default function Login() {
|
|
6
|
-
|
|
7
|
-
const router = useRouter();
|
|
8
|
-
|
|
9
|
-
useEffect(async () => {
|
|
10
|
-
if(!router.isReady) return;
|
|
11
|
-
|
|
12
|
-
await authService().login(router.query.redirecturl, router.query.deviceId);
|
|
13
|
-
|
|
14
|
-
}, [router.isReady]);
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<>
|
|
18
|
-
<div>
|
|
19
|
-
Please wait loading...
|
|
20
|
-
</div>
|
|
21
|
-
</>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import apiService from '../../services/apiService';
|
|
3
|
-
|
|
4
|
-
export default function LogoutPage({userLoaded}) {
|
|
5
|
-
|
|
6
|
-
useEffect(async () => {
|
|
7
|
-
|
|
8
|
-
await apiService().logout();
|
|
9
|
-
window.location.href = "/";
|
|
10
|
-
|
|
11
|
-
}, [userLoaded]);
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div>
|
|
15
|
-
Please wait logging you out...
|
|
16
|
-
</div>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useRouter } from 'next/router'
|
|
3
|
-
import apiService from '../../services/apiService';
|
|
4
|
-
|
|
5
|
-
export default function SignUp() {
|
|
6
|
-
|
|
7
|
-
const router = useRouter()
|
|
8
|
-
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
|
|
11
|
-
apiService().signUp(router.query.redirecturl);
|
|
12
|
-
|
|
13
|
-
}, []);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div> </div>
|
|
17
|
-
);
|
|
18
|
-
}
|
package/pages/signout-oidc.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
2
|
-
import { useRouter } from 'next/router'
|
|
3
|
-
|
|
4
|
-
function SignoutOidc() {
|
|
5
|
-
const router = useRouter();
|
|
6
|
-
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
async function signoutAsync() {
|
|
9
|
-
|
|
10
|
-
alert("need to remove items from local storage");
|
|
11
|
-
router.push('/');
|
|
12
|
-
}
|
|
13
|
-
signoutAsync()
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div>
|
|
18
|
-
Redirecting...
|
|
19
|
-
</div>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default SignoutOidc
|