@amedia/user 0.14.1 → 0.14.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@amedia/user",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Client lib for working with aID user and associated data",
5
5
  "repository": "https://github.com/amedia/amedia-user-js",
6
6
  "author": "Amedia Utvikling (ID og data)",
@@ -41,11 +41,6 @@ function isInAidEmergencyMode() {
41
41
  }
42
42
 
43
43
  const attemptAutologin = async (strategies: Strategies) => {
44
- if (isInAidEmergencyMode()) {
45
- // Avoid auto-login if we are in aid emergency mode
46
- return;
47
- }
48
-
49
44
  if (typeof window === 'undefined' || inIframe()) {
50
45
  // Avoid auto-login on preview for dr edition and in workers.
51
46
  return;
@@ -58,6 +53,11 @@ const attemptAutologin = async (strategies: Strategies) => {
58
53
  return;
59
54
  }
60
55
 
56
+ if (isInAidEmergencyMode()) {
57
+ // Avoid auto-login if we are in aid emergency mode
58
+ return;
59
+ }
60
+
61
61
  // eslint-disable-next-line no-restricted-syntax
62
62
  for (const strategy of strategies) {
63
63
  // eslint-disable-next-line no-await-in-loop