authscape 1.0.6 → 1.0.10

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 CHANGED
@@ -1,28 +1,28 @@
1
- {
2
- "name": "authscape",
3
- "version": "1.0.6",
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
+ {
2
+ "name": "authscape",
3
+ "version": "1.0.10",
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,11 @@
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 { parseCookies, setCookie, destroyCookie } from 'nookies';
4
+ import { setCookie } from 'nookies';
6
5
 
7
- export default function SigninOidc() {
8
-
9
- const router = useRouter();
10
- useEffect(async () => {
11
- if(!router.isReady) return;
12
-
13
- let codeVerifier = window.localStorage.getItem("verifier");
6
+ const signInValidator = () => {
7
+
8
+ let codeVerifier = window.localStorage.getItem("verifier");
14
9
  if (router.query.code != null && codeVerifier != null)
15
10
  {
16
11
  const headers = {'Content-Type': 'application/x-www-form-urlencoded'}
@@ -67,13 +62,7 @@ export default function SigninOidc() {
67
62
  {
68
63
  window.location.href = "/";
69
64
  }
70
- }
71
-
72
- }, [router.isReady]);
65
+ }
66
+ }
73
67
 
74
- return (
75
- <div>
76
- Redirecting...
77
- </div>
78
- )
79
- };
68
+ export default signInValidator;
@@ -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>&nbsp;</div>
17
- );
18
- }
@@ -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