authscape 1.0.26 → 1.0.29
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
package/services/authService.js
CHANGED
|
@@ -60,15 +60,17 @@ const authService = () => {
|
|
|
60
60
|
},
|
|
61
61
|
signUp: (redirectUrl = null) => {
|
|
62
62
|
|
|
63
|
+
let AuthUri = process.env.AUTHORITYURI;
|
|
64
|
+
|
|
63
65
|
let url = "";
|
|
64
66
|
if (redirectUrl == null)
|
|
65
67
|
{
|
|
66
|
-
url = AuthUri + "/Account/Register?
|
|
68
|
+
url = AuthUri + "/Account/Register?returnUrl=" + window.location.href;
|
|
67
69
|
localStorage.setItem("redirectUri", window.location.href);
|
|
68
70
|
}
|
|
69
71
|
else
|
|
70
72
|
{
|
|
71
|
-
url = AuthUri + "/Account/Register?
|
|
73
|
+
url = AuthUri + "/Account/Register?returnUrl=" + redirectUrl;
|
|
72
74
|
localStorage.setItem("redirectUri", redirectUrl);
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
2
|
import apiService from './apiService';
|
|
3
3
|
|
|
4
|
-
export default function AuthorizationComponent({children, setCurrentUser, userLoaded}) {
|
|
4
|
+
export default function AuthorizationComponent({children, setCurrentUser, userLoaded, isLoading}) {
|
|
5
5
|
|
|
6
6
|
const [loaded, setLoaded] = useState(false);
|
|
7
|
-
|
|
8
|
-
|
|
9
7
|
const validateUserSignedIn = async () => {
|
|
10
8
|
|
|
11
9
|
setLoaded(true);
|
|
@@ -32,5 +30,12 @@ export default function AuthorizationComponent({children, setCurrentUser, userLo
|
|
|
32
30
|
|
|
33
31
|
}, [loaded]);
|
|
34
32
|
|
|
35
|
-
return (
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
{children}
|
|
36
|
+
<Backdrop sx={{ color: '#fff', zIndex: 99999 }} open={isLoading}>
|
|
37
|
+
<CircularProgress color="inherit" />
|
|
38
|
+
</Backdrop>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
36
41
|
}
|