@equinor/mad-auth 0.1.21 → 0.1.23
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/CHANGELOG.md +12 -0
- package/dist/_internal/translationLayer.js +1 -1
- package/dist/auth.js +2 -2
- package/dist/{chunk-6GAWEDT7.js → chunk-763B4HQC.js} +2 -1
- package/dist/{chunk-6XZQ7DKI.js → chunk-GCZJ767T.js} +2 -2
- package/dist/{chunk-5TNEJPZM.js → chunk-HIGCNJNC.js} +2 -2
- package/dist/{chunk-NRXJJLOK.js → chunk-UT6IGOV7.js} +3 -1
- package/dist/{chunk-GJN2PRS3.js → chunk-ZTEWSERJ.js} +2 -2
- package/dist/components/LoginButton.js +4 -4
- package/dist/components/index.js +4 -4
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/useAccount.js +3 -3
- package/dist/hooks/useAuthenticate.js +3 -3
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @equinor/mad-auth
|
|
2
2
|
|
|
3
|
+
## 0.1.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bfb69d7: Can no longer initiate authentication client multiple times
|
|
8
|
+
|
|
9
|
+
## 0.1.22
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- af77bb9: getAccount/useAccount should now work for web
|
|
14
|
+
|
|
3
15
|
## 0.1.21
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/auth.js
CHANGED
|
@@ -49,9 +49,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
|
|
50
50
|
// src/_internal/translationLayer.ts
|
|
51
51
|
var getMadAccount = (account) => {
|
|
52
|
+
var _a;
|
|
52
53
|
return {
|
|
53
54
|
username: account.username,
|
|
54
|
-
name: account.claims
|
|
55
|
+
name: (_a = account.claims) == null ? void 0 : _a.name,
|
|
55
56
|
identifier: account.identifier
|
|
56
57
|
};
|
|
57
58
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAuthenticate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HIGCNJNC.js";
|
|
4
4
|
import {
|
|
5
5
|
__objRest,
|
|
6
6
|
__spreadValues
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-763B4HQC.js";
|
|
8
8
|
|
|
9
9
|
// src/components/LoginButton.tsx
|
|
10
10
|
import React from "react";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
authenticateSilently,
|
|
4
4
|
authenticationClientExists,
|
|
5
5
|
initiateAuthenticationClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UT6IGOV7.js";
|
|
7
7
|
import {
|
|
8
8
|
__async
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-763B4HQC.js";
|
|
10
10
|
|
|
11
11
|
// src/hooks/useAuthenticate.ts
|
|
12
12
|
import { useEffect, useState } from "react";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__async,
|
|
3
3
|
getMadAccount,
|
|
4
4
|
getMadAuthenticationResult
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-763B4HQC.js";
|
|
6
6
|
|
|
7
7
|
// src/auth.ts
|
|
8
8
|
import PublicClientApplication from "react-native-msal";
|
|
@@ -34,6 +34,8 @@ function initiateAuthenticationClient(_0) {
|
|
|
34
34
|
redirectUri,
|
|
35
35
|
authority = "https://login.microsoftonline.com/statoilsrm.onmicrosoft.com/"
|
|
36
36
|
}) {
|
|
37
|
+
if (authenticationClientExists())
|
|
38
|
+
return;
|
|
37
39
|
const config = {
|
|
38
40
|
auth: {
|
|
39
41
|
authority,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoginButton
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GCZJ767T.js";
|
|
4
|
+
import "../chunk-HIGCNJNC.js";
|
|
5
|
+
import "../chunk-UT6IGOV7.js";
|
|
6
|
+
import "../chunk-763B4HQC.js";
|
|
7
7
|
export {
|
|
8
8
|
LoginButton
|
|
9
9
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../chunk-HAB34YS7.js";
|
|
2
2
|
import {
|
|
3
3
|
LoginButton
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-GCZJ767T.js";
|
|
5
|
+
import "../chunk-HIGCNJNC.js";
|
|
6
|
+
import "../chunk-UT6IGOV7.js";
|
|
7
|
+
import "../chunk-763B4HQC.js";
|
|
8
8
|
export {
|
|
9
9
|
LoginButton
|
|
10
10
|
};
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../chunk-GUKC6UGZ.js";
|
|
2
2
|
import {
|
|
3
3
|
useAuthenticate
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-HIGCNJNC.js";
|
|
5
5
|
import {
|
|
6
6
|
useAccount
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-ZTEWSERJ.js";
|
|
8
|
+
import "../chunk-UT6IGOV7.js";
|
|
9
|
+
import "../chunk-763B4HQC.js";
|
|
10
10
|
export {
|
|
11
11
|
useAccount,
|
|
12
12
|
useAuthenticate
|
package/dist/hooks/useAccount.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@ import "./chunk-6F4PWJZI.js";
|
|
|
2
2
|
import "./chunk-HAB34YS7.js";
|
|
3
3
|
import {
|
|
4
4
|
LoginButton
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GCZJ767T.js";
|
|
6
6
|
import "./chunk-GUKC6UGZ.js";
|
|
7
7
|
import {
|
|
8
8
|
useAuthenticate
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HIGCNJNC.js";
|
|
10
10
|
import {
|
|
11
11
|
useAccount
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZTEWSERJ.js";
|
|
13
13
|
import {
|
|
14
14
|
authenticateInteractively,
|
|
15
15
|
authenticateSilently,
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
getAccount,
|
|
18
18
|
initiateAuthenticationClient,
|
|
19
19
|
signOut
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-UT6IGOV7.js";
|
|
21
|
+
import "./chunk-763B4HQC.js";
|
|
22
22
|
export {
|
|
23
23
|
LoginButton,
|
|
24
24
|
authenticateInteractively,
|