@equinor/mad-auth 0.1.21 → 0.1.22

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @equinor/mad-auth
2
2
 
3
+ ## 0.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - af77bb9: getAccount/useAccount should now work for web
8
+
3
9
  ## 0.1.21
4
10
 
5
11
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getMadAccount,
3
3
  getMadAuthenticationResult
4
- } from "../chunk-6GAWEDT7.js";
4
+ } from "../chunk-763B4HQC.js";
5
5
  export {
6
6
  getMadAccount,
7
7
  getMadAuthenticationResult
package/dist/auth.js CHANGED
@@ -5,8 +5,8 @@ import {
5
5
  getAccount,
6
6
  initiateAuthenticationClient,
7
7
  signOut
8
- } from "./chunk-NRXJJLOK.js";
9
- import "./chunk-6GAWEDT7.js";
8
+ } from "./chunk-7EEUEA5H.js";
9
+ import "./chunk-763B4HQC.js";
10
10
  export {
11
11
  authenticateInteractively,
12
12
  authenticateSilently,
@@ -3,10 +3,10 @@ import {
3
3
  authenticateSilently,
4
4
  authenticationClientExists,
5
5
  initiateAuthenticationClient
6
- } from "./chunk-NRXJJLOK.js";
6
+ } from "./chunk-7EEUEA5H.js";
7
7
  import {
8
8
  __async
9
- } from "./chunk-6GAWEDT7.js";
9
+ } from "./chunk-763B4HQC.js";
10
10
 
11
11
  // src/hooks/useAuthenticate.ts
12
12
  import { useEffect, useState } from "react";
@@ -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.name || void 0,
55
+ name: (_a = account.claims) == null ? void 0 : _a.name,
55
56
  identifier: account.identifier
56
57
  };
57
58
  };
@@ -2,7 +2,7 @@ import {
2
2
  __async,
3
3
  getMadAccount,
4
4
  getMadAuthenticationResult
5
- } from "./chunk-6GAWEDT7.js";
5
+ } from "./chunk-763B4HQC.js";
6
6
 
7
7
  // src/auth.ts
8
8
  import PublicClientApplication from "react-native-msal";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getAccount
3
- } from "./chunk-NRXJJLOK.js";
3
+ } from "./chunk-7EEUEA5H.js";
4
4
  import {
5
5
  __async
6
- } from "./chunk-6GAWEDT7.js";
6
+ } from "./chunk-763B4HQC.js";
7
7
 
8
8
  // src/hooks/useAccount.ts
9
9
  import { useEffect, useState } from "react";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  useAuthenticate
3
- } from "./chunk-5TNEJPZM.js";
3
+ } from "./chunk-5ZFESLUU.js";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadValues
7
- } from "./chunk-6GAWEDT7.js";
7
+ } from "./chunk-763B4HQC.js";
8
8
 
9
9
  // src/components/LoginButton.tsx
10
10
  import React from "react";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  LoginButton
3
- } from "../chunk-6XZQ7DKI.js";
4
- import "../chunk-5TNEJPZM.js";
5
- import "../chunk-NRXJJLOK.js";
6
- import "../chunk-6GAWEDT7.js";
3
+ } from "../chunk-EDBEFTNX.js";
4
+ import "../chunk-5ZFESLUU.js";
5
+ import "../chunk-7EEUEA5H.js";
6
+ import "../chunk-763B4HQC.js";
7
7
  export {
8
8
  LoginButton
9
9
  };
@@ -1,10 +1,10 @@
1
1
  import "../chunk-HAB34YS7.js";
2
2
  import {
3
3
  LoginButton
4
- } from "../chunk-6XZQ7DKI.js";
5
- import "../chunk-5TNEJPZM.js";
6
- import "../chunk-NRXJJLOK.js";
7
- import "../chunk-6GAWEDT7.js";
4
+ } from "../chunk-EDBEFTNX.js";
5
+ import "../chunk-5ZFESLUU.js";
6
+ import "../chunk-7EEUEA5H.js";
7
+ import "../chunk-763B4HQC.js";
8
8
  export {
9
9
  LoginButton
10
10
  };
@@ -1,12 +1,12 @@
1
1
  import "../chunk-GUKC6UGZ.js";
2
2
  import {
3
3
  useAuthenticate
4
- } from "../chunk-5TNEJPZM.js";
4
+ } from "../chunk-5ZFESLUU.js";
5
5
  import {
6
6
  useAccount
7
- } from "../chunk-GJN2PRS3.js";
8
- import "../chunk-NRXJJLOK.js";
9
- import "../chunk-6GAWEDT7.js";
7
+ } from "../chunk-B2EGV2KL.js";
8
+ import "../chunk-7EEUEA5H.js";
9
+ import "../chunk-763B4HQC.js";
10
10
  export {
11
11
  useAccount,
12
12
  useAuthenticate
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  useAccount
3
- } from "../chunk-GJN2PRS3.js";
4
- import "../chunk-NRXJJLOK.js";
5
- import "../chunk-6GAWEDT7.js";
3
+ } from "../chunk-B2EGV2KL.js";
4
+ import "../chunk-7EEUEA5H.js";
5
+ import "../chunk-763B4HQC.js";
6
6
  export {
7
7
  useAccount
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  useAuthenticate
3
- } from "../chunk-5TNEJPZM.js";
4
- import "../chunk-NRXJJLOK.js";
5
- import "../chunk-6GAWEDT7.js";
3
+ } from "../chunk-5ZFESLUU.js";
4
+ import "../chunk-7EEUEA5H.js";
5
+ import "../chunk-763B4HQC.js";
6
6
  export {
7
7
  useAuthenticate
8
8
  };
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-6XZQ7DKI.js";
5
+ } from "./chunk-EDBEFTNX.js";
6
6
  import "./chunk-GUKC6UGZ.js";
7
7
  import {
8
8
  useAuthenticate
9
- } from "./chunk-5TNEJPZM.js";
9
+ } from "./chunk-5ZFESLUU.js";
10
10
  import {
11
11
  useAccount
12
- } from "./chunk-GJN2PRS3.js";
12
+ } from "./chunk-B2EGV2KL.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-NRXJJLOK.js";
21
- import "./chunk-6GAWEDT7.js";
20
+ } from "./chunk-7EEUEA5H.js";
21
+ import "./chunk-763B4HQC.js";
22
22
  export {
23
23
  LoginButton,
24
24
  authenticateInteractively,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/mad-auth",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "A simple wrapper library for react-native-msal",
5
5
  "type": "module",
6
6
  "keywords": [