@ebubekirylmaz/link-test 1.2.37 → 1.2.39
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/src/Platform.jsx
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import "./global.css";
|
|
2
2
|
import "./widgets/Login/amplifyAuth";
|
|
3
3
|
|
|
4
|
-
import { BrowserRouter, Navigate } from "react-router-dom";
|
|
5
|
-
import { initialState, reducer } from "./context/reducer";
|
|
6
|
-
import { publish, subscribe, useEvent } from "@nucleoidai/react-event";
|
|
7
|
-
|
|
8
4
|
import ContextProvider from "./ContextProvider/ContextProvider";
|
|
9
5
|
import GlobalSnackMessage from "./GlobalSnackMessage/GlobalSnackMessage";
|
|
10
6
|
import React from "react";
|
|
@@ -19,6 +15,10 @@ import http from "./http";
|
|
|
19
15
|
import { init } from "./config/config";
|
|
20
16
|
import oauth from "./http/oauth";
|
|
21
17
|
|
|
18
|
+
import { BrowserRouter, Navigate } from "react-router-dom";
|
|
19
|
+
import { initialState, reducer } from "./context/reducer";
|
|
20
|
+
import { publish, subscribe, useEvent } from "@nucleoidai/react-event";
|
|
21
|
+
|
|
22
22
|
init();
|
|
23
23
|
|
|
24
24
|
configureAmplify();
|
|
@@ -104,7 +104,7 @@ function ProjectBar() {
|
|
|
104
104
|
payload.username = "admin";
|
|
105
105
|
payload.password = "admin";
|
|
106
106
|
} else if (identityProvider === "COGNITO") {
|
|
107
|
-
payload.refreshToken = storage.get("link", "
|
|
107
|
+
payload.refreshToken = storage.get("link", "refreshToken");
|
|
108
108
|
} else {
|
|
109
109
|
payload.refreshToken = storage.get("link", "refreshToken");
|
|
110
110
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Amplify } from "aws-amplify";
|
|
2
|
+
import config from "../../config/config";
|
|
3
|
+
|
|
4
|
+
export function configureAmplify() {
|
|
5
|
+
const { credentials } = config();
|
|
6
|
+
|
|
7
|
+
if (!credentials) {
|
|
8
|
+
throw new Error("CONFIG not initialized yet");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Amplify.configure({
|
|
12
|
+
Auth: {
|
|
13
|
+
Cognito: {
|
|
14
|
+
userPoolId: credentials.userPoolId,
|
|
15
|
+
userPoolClientId: credentials.clientId,
|
|
16
|
+
region: credentials.region,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|