@civic/auth 0.0.1-tsc.alpha.3 → 0.1.0

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.
Files changed (155) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/.turbo/turbo-lint.log +2 -9
  3. package/.turbo/turbo-test.log +396 -474
  4. package/CHANGELOG.md +2 -0
  5. package/dist/cjs/src/browser/storage.d.ts +2 -2
  6. package/dist/cjs/src/browser/storage.d.ts.map +1 -1
  7. package/dist/cjs/src/browser/storage.js +3 -3
  8. package/dist/cjs/src/browser/storage.js.map +1 -1
  9. package/dist/cjs/src/nextjs/GetUser.d.ts +1 -1
  10. package/dist/cjs/src/nextjs/GetUser.d.ts.map +1 -1
  11. package/dist/cjs/src/nextjs/GetUser.js +3 -3
  12. package/dist/cjs/src/nextjs/GetUser.js.map +1 -1
  13. package/dist/cjs/src/nextjs/config.d.ts.map +1 -1
  14. package/dist/cjs/src/nextjs/config.js +0 -2
  15. package/dist/cjs/src/nextjs/config.js.map +1 -1
  16. package/dist/cjs/src/nextjs/cookies.d.ts +4 -4
  17. package/dist/cjs/src/nextjs/cookies.d.ts.map +1 -1
  18. package/dist/cjs/src/nextjs/cookies.js +14 -11
  19. package/dist/cjs/src/nextjs/cookies.js.map +1 -1
  20. package/dist/cjs/src/nextjs/index.d.ts +1 -1
  21. package/dist/cjs/src/nextjs/index.d.ts.map +1 -1
  22. package/dist/cjs/src/nextjs/index.js.map +1 -1
  23. package/dist/cjs/src/nextjs/routeHandler.d.ts.map +1 -1
  24. package/dist/cjs/src/nextjs/routeHandler.js +1 -5
  25. package/dist/cjs/src/nextjs/routeHandler.js.map +1 -1
  26. package/dist/cjs/src/reactjs/hooks/index.d.ts +0 -1
  27. package/dist/cjs/src/reactjs/hooks/index.d.ts.map +1 -1
  28. package/dist/cjs/src/reactjs/hooks/index.js +1 -3
  29. package/dist/cjs/src/reactjs/hooks/index.js.map +1 -1
  30. package/dist/cjs/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
  31. package/dist/cjs/src/server/ServerAuthenticationResolver.js +2 -7
  32. package/dist/cjs/src/server/ServerAuthenticationResolver.js.map +1 -1
  33. package/dist/cjs/src/server/login.d.ts +2 -2
  34. package/dist/cjs/src/server/login.d.ts.map +1 -1
  35. package/dist/cjs/src/server/login.js +2 -2
  36. package/dist/cjs/src/server/login.js.map +1 -1
  37. package/dist/cjs/src/services/AuthenticationService.d.ts.map +1 -1
  38. package/dist/cjs/src/services/AuthenticationService.js +6 -16
  39. package/dist/cjs/src/services/AuthenticationService.js.map +1 -1
  40. package/dist/cjs/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
  41. package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js +0 -2
  42. package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
  43. package/dist/cjs/src/shared/components/LoadingIcon.d.ts.map +1 -1
  44. package/dist/cjs/src/shared/components/LoadingIcon.js +6 -0
  45. package/dist/cjs/src/shared/components/LoadingIcon.js.map +1 -1
  46. package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
  47. package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
  48. package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
  49. package/dist/cjs/src/shared/lib/UserSession.d.ts +4 -4
  50. package/dist/cjs/src/shared/lib/UserSession.d.ts.map +1 -1
  51. package/dist/cjs/src/shared/lib/UserSession.js +4 -4
  52. package/dist/cjs/src/shared/lib/UserSession.js.map +1 -1
  53. package/dist/cjs/src/shared/lib/session.js +1 -1
  54. package/dist/cjs/src/shared/lib/session.js.map +1 -1
  55. package/dist/cjs/src/shared/lib/storage.d.ts +2 -2
  56. package/dist/cjs/src/shared/lib/storage.d.ts.map +1 -1
  57. package/dist/cjs/src/shared/lib/storage.js.map +1 -1
  58. package/dist/cjs/src/shared/lib/util.d.ts +4 -4
  59. package/dist/cjs/src/shared/lib/util.d.ts.map +1 -1
  60. package/dist/cjs/src/shared/lib/util.js +16 -15
  61. package/dist/cjs/src/shared/lib/util.js.map +1 -1
  62. package/dist/cjs/src/types.d.ts +2 -2
  63. package/dist/cjs/src/types.d.ts.map +1 -1
  64. package/dist/cjs/src/types.js.map +1 -1
  65. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  66. package/dist/esm/src/browser/storage.d.ts +2 -2
  67. package/dist/esm/src/browser/storage.d.ts.map +1 -1
  68. package/dist/esm/src/browser/storage.js +3 -3
  69. package/dist/esm/src/browser/storage.js.map +1 -1
  70. package/dist/esm/src/nextjs/GetUser.d.ts +1 -1
  71. package/dist/esm/src/nextjs/GetUser.d.ts.map +1 -1
  72. package/dist/esm/src/nextjs/GetUser.js +3 -3
  73. package/dist/esm/src/nextjs/GetUser.js.map +1 -1
  74. package/dist/esm/src/nextjs/config.d.ts.map +1 -1
  75. package/dist/esm/src/nextjs/config.js +0 -2
  76. package/dist/esm/src/nextjs/config.js.map +1 -1
  77. package/dist/esm/src/nextjs/cookies.d.ts +4 -4
  78. package/dist/esm/src/nextjs/cookies.d.ts.map +1 -1
  79. package/dist/esm/src/nextjs/cookies.js +14 -11
  80. package/dist/esm/src/nextjs/cookies.js.map +1 -1
  81. package/dist/esm/src/nextjs/index.d.ts +1 -1
  82. package/dist/esm/src/nextjs/index.d.ts.map +1 -1
  83. package/dist/esm/src/nextjs/index.js +1 -1
  84. package/dist/esm/src/nextjs/index.js.map +1 -1
  85. package/dist/esm/src/nextjs/routeHandler.d.ts.map +1 -1
  86. package/dist/esm/src/nextjs/routeHandler.js +1 -5
  87. package/dist/esm/src/nextjs/routeHandler.js.map +1 -1
  88. package/dist/esm/src/reactjs/hooks/index.d.ts +0 -1
  89. package/dist/esm/src/reactjs/hooks/index.d.ts.map +1 -1
  90. package/dist/esm/src/reactjs/hooks/index.js +0 -1
  91. package/dist/esm/src/reactjs/hooks/index.js.map +1 -1
  92. package/dist/esm/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
  93. package/dist/esm/src/server/ServerAuthenticationResolver.js +2 -7
  94. package/dist/esm/src/server/ServerAuthenticationResolver.js.map +1 -1
  95. package/dist/esm/src/server/login.d.ts +2 -2
  96. package/dist/esm/src/server/login.d.ts.map +1 -1
  97. package/dist/esm/src/server/login.js +2 -2
  98. package/dist/esm/src/server/login.js.map +1 -1
  99. package/dist/esm/src/services/AuthenticationService.d.ts.map +1 -1
  100. package/dist/esm/src/services/AuthenticationService.js +6 -16
  101. package/dist/esm/src/services/AuthenticationService.js.map +1 -1
  102. package/dist/esm/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
  103. package/dist/esm/src/shared/components/CivicAuthIframeContainer.js +0 -2
  104. package/dist/esm/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
  105. package/dist/esm/src/shared/components/LoadingIcon.d.ts.map +1 -1
  106. package/dist/esm/src/shared/components/LoadingIcon.js +6 -0
  107. package/dist/esm/src/shared/components/LoadingIcon.js.map +1 -1
  108. package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
  109. package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
  110. package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
  111. package/dist/esm/src/shared/lib/UserSession.d.ts +4 -4
  112. package/dist/esm/src/shared/lib/UserSession.d.ts.map +1 -1
  113. package/dist/esm/src/shared/lib/UserSession.js +4 -4
  114. package/dist/esm/src/shared/lib/UserSession.js.map +1 -1
  115. package/dist/esm/src/shared/lib/session.js +1 -1
  116. package/dist/esm/src/shared/lib/session.js.map +1 -1
  117. package/dist/esm/src/shared/lib/storage.d.ts +2 -2
  118. package/dist/esm/src/shared/lib/storage.d.ts.map +1 -1
  119. package/dist/esm/src/shared/lib/storage.js.map +1 -1
  120. package/dist/esm/src/shared/lib/util.d.ts +4 -4
  121. package/dist/esm/src/shared/lib/util.d.ts.map +1 -1
  122. package/dist/esm/src/shared/lib/util.js +16 -15
  123. package/dist/esm/src/shared/lib/util.js.map +1 -1
  124. package/dist/esm/src/types.d.ts +2 -2
  125. package/dist/esm/src/types.d.ts.map +1 -1
  126. package/dist/esm/src/types.js.map +1 -1
  127. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  128. package/package.json +3 -3
  129. package/src/browser/storage.ts +3 -3
  130. package/src/nextjs/GetUser.ts +3 -3
  131. package/src/nextjs/config.ts +0 -2
  132. package/src/nextjs/cookies.ts +14 -18
  133. package/src/nextjs/index.ts +1 -3
  134. package/src/nextjs/routeHandler.ts +1 -5
  135. package/src/reactjs/hooks/index.ts +0 -1
  136. package/src/server/ServerAuthenticationResolver.ts +2 -7
  137. package/src/server/login.ts +8 -7
  138. package/src/services/AuthenticationService.ts +6 -16
  139. package/src/shared/components/CivicAuthIframeContainer.tsx +0 -4
  140. package/src/shared/components/LoadingIcon.tsx +8 -0
  141. package/src/shared/lib/GenericAuthenticationRefresher.ts +3 -8
  142. package/src/shared/lib/UserSession.ts +6 -6
  143. package/src/shared/lib/session.ts +1 -1
  144. package/src/shared/lib/storage.ts +2 -2
  145. package/src/shared/lib/util.ts +21 -18
  146. package/src/types.ts +2 -2
  147. package/test/unit/nextjs/getUser.test.ts +8 -8
  148. package/test/unit/publicApi/__snapshots__/apiSnapshot.test.ts.snap +0 -1
  149. package/test/unit/server/login.test.ts +20 -18
  150. package/test/unit/server/session.test.ts +4 -4
  151. package/test/unit/services/AuthenticationService.test.ts +3 -3
  152. package/test/unit/services/ServerAuthenticationResolver.test.ts +11 -6
  153. package/test/unit/shared/GenericAuthenticationRefresher.test.ts +4 -4
  154. package/test/unit/shared/UserSession.test.ts +6 -6
  155. package/test/unit/shared/storage.test.ts +6 -6
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @civic/auth@0.0.1-beta.25 test /Users/flippie/civic/repos/civic-auth/packages/civic-auth-client
3
+ > @civic/auth@0.0.1-beta.26 test /Users/flippie/civic/repos/civic-auth/packages/civic-auth-client
4
4
  > vitest "--run" "--coverage"
5
5
 
6
6
 
@@ -8,22 +8,20 @@
8
8
   Coverage enabled with v8
9
9
 
10
10
  [?25l · test/unit/logger.test.ts (11)
11
- · test/unit/shared/storage.test.ts (3)
12
- · test/unit/utils.test.ts (4)
13
- stdout | test/unit/nextjs/config.test.ts
14
- process.env.NODE_ENV: development
15
- defaultServerSecure: false
16
-
17
- stdout | test/unit/nextjs/middleware.test.ts
11
+ [?25l[?25l ✓ test/unit/logger.test.ts (11)
12
+ [?25l[?25l[?25l[?25lstdout | test/unit/nextjs/config.test.ts
18
13
  process.env.NODE_ENV: development
19
14
  defaultServerSecure: false
20
15
 
21
16
  [?25l · test/unit/nextjs/config.test.ts (10)
22
17
  ✓ test/unit/logger.test.ts (11)
23
- · test/unit/nextjs/middleware.test.ts (7)
24
18
  · test/unit/shared/storage.test.ts (3)
25
19
  · test/unit/utils.test.ts (4)
26
- stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > authMiddleware > should allow access when token is present
20
+ stdout | test/unit/nextjs/middleware.test.ts
21
+ process.env.NODE_ENV: development
22
+ defaultServerSecure: false
23
+
24
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > authMiddleware > should allow access when token is present
27
25
  matching { pattern: '/*', pathname: '/protected', match: true }
28
26
  → Auth check passed
29
27
 
@@ -38,7 +36,12 @@ matching { pattern: '/*', pathname: '/login', match: tr
38
36
  matching { pattern: '/*', pathname: '/protected', match: true }
39
37
  → Auth check passed
40
38
 
41
- stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > withAuth > should not chain custom middleware when unauthorized
39
+ [?25l · test/unit/nextjs/config.test.ts (10)
40
+ ✓ test/unit/logger.test.ts (11)
41
+ · test/unit/nextjs/middleware.test.ts (7)
42
+ · test/unit/shared/storage.test.ts (3)
43
+ · test/unit/utils.test.ts (4)
44
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > withAuth > should not chain custom middleware when unauthorized
42
45
  matching { pattern: '/*', pathname: '/protected', match: true }
43
46
  → No valid token found - redirecting to login URL {}
44
47
 
@@ -63,28 +66,80 @@ matching {
63
66
  process.env.NODE_ENV: production
64
67
  defaultServerSecure: true
65
68
 
66
- [?25l · test/unit/nextjs/config.test.ts (10)
69
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
70
+ ❯ nextjs/config (10)
71
+ ❯ resolveAuthConfig (7)
72
+ ✓ should throw an error if clientId is not provided
73
+ ✓ should use default values when no config is provided
74
+ ✓ should override default values with provided config
75
+ ✓ should use environment variables if set
76
+ ✓ should prioritize provided config over environment variables
77
+ ✓ should merge cookie configurations correctly
78
+ ⠙ should set secure to true in the default cookie configs if NODE_ENV is not development
79
+ · createCivicAuthPlugin (3)
67
80
  ✓ test/unit/logger.test.ts (11)
68
81
  · test/unit/nextjs/middleware.test.ts (7)
69
- ✓ test/unit/shared/storage.test.ts (3)
70
- ✓ test/unit/utils.test.ts (4)
71
- [?25l · test/unit/nextjs/config.test.ts (10)
82
+ · test/unit/shared/storage.test.ts (3)
83
+ · test/unit/utils.test.ts (4)
84
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
85
+ ❯ nextjs/config (10)
86
+ ❯ resolveAuthConfig (7)
87
+ ✓ should throw an error if clientId is not provided
88
+ ✓ should use default values when no config is provided
89
+ ✓ should override default values with provided config
90
+ ✓ should use environment variables if set
91
+ ✓ should prioritize provided config over environment variables
92
+ ✓ should merge cookie configurations correctly
93
+ ⠹ should set secure to true in the default cookie configs if NODE_ENV is not development
94
+ · createCivicAuthPlugin (3)
72
95
  ✓ test/unit/logger.test.ts (11)
73
- ✓ test/unit/nextjs/middleware.test.ts (7)
96
+ · test/unit/nextjs/middleware.test.ts (7)
74
97
  ✓ test/unit/shared/storage.test.ts (3)
75
98
  ✓ test/unit/utils.test.ts (4)
76
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
99
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
77
100
  ✓ test/unit/logger.test.ts (11)
78
101
  ✓ test/unit/nextjs/middleware.test.ts (7)
79
102
  ✓ test/unit/shared/storage.test.ts (3)
80
103
  ✓ test/unit/utils.test.ts (4)
81
- [?25l[?25l[?25l ✓ test/unit/nextjs/config.test.ts (10)
104
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/unit/nextjs/config.test.ts (10)
82
105
  ✓ test/unit/logger.test.ts (11)
83
106
  ✓ test/unit/nextjs/middleware.test.ts (7)
107
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
108
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
84
109
  · test/unit/lib/oauth.test.ts (6)
85
110
  ✓ test/unit/shared/storage.test.ts (3)
86
111
  ✓ test/unit/utils.test.ts (4)
87
- stderr | test/unit/lib/oauth.test.ts > displayModeFromState > should return the display mode from the state
112
+ stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > init > should initialize OAuth2 client with resolved endpoints
113
+ GenericAuthenticationRefresher constructor {
114
+ authConfig: {
115
+ clientId: 'mockClientId',
116
+ oauthServer: 'http://mockOauthServer',
117
+ redirectUrl: 'http://localhost/redirect'
118
+ },
119
+ endpointOverrides: undefined
120
+ }
121
+
122
+ stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > refreshTokens > should refresh tokens and store them
123
+ GenericAuthenticationRefresher constructor {
124
+ authConfig: {
125
+ clientId: 'mockClientId',
126
+ oauthServer: 'http://mockOauthServer',
127
+ redirectUrl: 'http://localhost/redirect'
128
+ },
129
+ endpointOverrides: undefined
130
+ }
131
+
132
+ stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > refreshTokens > should throw an error if no refresh token is available
133
+ GenericAuthenticationRefresher constructor {
134
+ authConfig: {
135
+ clientId: 'mockClientId',
136
+ oauthServer: 'http://mockOauthServer',
137
+ redirectUrl: 'http://localhost/redirect'
138
+ },
139
+ endpointOverrides: undefined
140
+ }
141
+
142
+ stderr | test/unit/lib/oauth.test.ts > displayModeFromState > should return the display mode from the state
88
143
  Failed to parse displayMode from state: state DOMException [InvalidCharacterError]: The string to be decoded is not correctly encoded.
89
144
   at atob (node:buffer:1296:13)
90
145
  at Module.displayModeFromState (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
@@ -97,46 +152,6 @@ Failed to parse displayMode from state: state DOMException [InvalidCharacterErro
97
152
  at runSuite (file:///Users/flippie/civic/repos/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
98
153
  at runSuite (file:///Users/flippie/civic/repos/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
99
154
 
100
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
101
- ✓ test/unit/logger.test.ts (11)
102
- · test/unit/services/AuthenticationService.test.ts (6)
103
- ✓ test/unit/nextjs/middleware.test.ts (7)
104
- · test/unit/lib/oauth.test.ts (6)
105
- ✓ test/unit/shared/storage.test.ts (3)
106
- ✓ test/unit/utils.test.ts (4)
107
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
108
- ✓ test/unit/logger.test.ts (11)
109
- · test/unit/services/AuthenticationService.test.ts (6)
110
- ✓ test/unit/nextjs/middleware.test.ts (7)
111
- · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
112
- · test/unit/lib/oauth.test.ts (6)
113
- ✓ test/unit/shared/storage.test.ts (3)
114
- · test/unit/server/session.test.ts (3)
115
- ✓ test/unit/utils.test.ts (4)
116
- stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
117
- BrowserAuthenticationInitiator constructor {
118
- clientId: 'mockClientId',
119
- redirectUrl: 'http://localhost/redirect',
120
- state: 'mockState',
121
- scopes: [ 'openid', 'profile' ],
122
- displayMode: 'redirect',
123
- oauthServer: 'http://mockOauthServer',
124
- pkceConsumer: {}
125
- }
126
-
127
- stderr | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
128
- Error: Not implemented: navigation (except hash changes)
129
- at module.exports (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
130
- at navigateFetch (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:77:3)
131
- at exports.navigate (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:55:3)
132
- at LocationImpl._locationObjectNavigate (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:31:5)
133
- at LocationImpl._locationObjectSetterNavigate (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:25:17)
134
- at LocationImpl.set href [as href] (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:47:10)
135
- at Location.set href [as href] (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/generated/Location.js:125:37)
136
- at BrowserAuthenticationInitiator.signIn (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:115:23)
137
- at processTicksAndRejections (node:internal/process/task_queues:105:5)
138
- at /Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/test/unit/services/AuthenticationService.test.ts:54:19 undefined
139
-
140
155
  stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > init > should initialize OAuth2 client with resolved endpoints
141
156
  ServerAuthenticationResolver constructor {
142
157
  authConfig: {
@@ -185,6 +200,52 @@ ServerAuthenticationResolver constructor {
185
200
  endpointOverrides: undefined
186
201
  }
187
202
 
203
+ stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > getSessionData > should return null if no tokens are found in storage
204
+ ServerAuthenticationResolver constructor {
205
+ authConfig: {
206
+ clientId: 'mockClientId',
207
+ oauthServer: 'http://mockOauthServer',
208
+ redirectUrl: 'http://localhost/redirect',
209
+ challengeUrl: 'http://localhost/challenge'
210
+ },
211
+ storage: {},
212
+ endpointOverrides: undefined
213
+ }
214
+
215
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
216
+ ✓ test/unit/logger.test.ts (11)
217
+ · test/unit/services/AuthenticationService.test.ts (6)
218
+ ✓ test/unit/nextjs/middleware.test.ts (7)
219
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
220
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
221
+ ✓ test/unit/lib/oauth.test.ts (6)
222
+ ✓ test/unit/shared/storage.test.ts (3)
223
+ · test/unit/server/session.test.ts (3)
224
+ ✓ test/unit/utils.test.ts (4)
225
+ [?25lstdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
226
+ BrowserAuthenticationInitiator constructor {
227
+ clientId: 'mockClientId',
228
+ redirectUrl: 'http://localhost/redirect',
229
+ state: 'mockState',
230
+ scopes: [ 'openid', 'profile' ],
231
+ displayMode: 'redirect',
232
+ oauthServer: 'http://mockOauthServer',
233
+ pkceConsumer: {}
234
+ }
235
+
236
+ stderr | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
237
+ Error: Not implemented: navigation (except hash changes)
238
+ at module.exports (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
239
+ at navigateFetch (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:77:3)
240
+ at exports.navigate (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:55:3)
241
+ at LocationImpl._locationObjectNavigate (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:31:5)
242
+ at LocationImpl._locationObjectSetterNavigate (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:25:17)
243
+ at LocationImpl.set href [as href] (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:47:10)
244
+ at Location.set href [as href] (/Users/flippie/civic/repos/civic-auth/node_modules/jsdom/lib/jsdom/living/generated/Location.js:125:37)
245
+ at BrowserAuthenticationInitiator.signIn (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:115:23)
246
+ at processTicksAndRejections (node:internal/process/task_queues:105:5)
247
+ at /Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/test/unit/services/AuthenticationService.test.ts:54:19 undefined
248
+
188
249
  stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a logout URL
189
250
  BrowserAuthenticationInitiator constructor {
190
251
  clientId: 'mockClientId',
@@ -222,30 +283,7 @@ GenericAuthenticationInitiator constructor {
222
283
  }
223
284
  }
224
285
 
225
- stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > getSessionData > should return null if no tokens are found in storage
226
- ServerAuthenticationResolver constructor {
227
- authConfig: {
228
- clientId: 'mockClientId',
229
- oauthServer: 'http://mockOauthServer',
230
- redirectUrl: 'http://localhost/redirect',
231
- challengeUrl: 'http://localhost/challenge'
232
- },
233
- storage: {},
234
- endpointOverrides: undefined
235
- }
236
-
237
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
238
- · test/unit/server/login.test.ts (6)
239
- ✓ test/unit/logger.test.ts (11)
240
- · test/unit/services/AuthenticationService.test.ts (6)
241
- ✓ test/unit/nextjs/middleware.test.ts (7)
242
- · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
243
- · test/unit/services/ServerAuthenticationResolver.test.ts (5)
244
- ✓ test/unit/lib/oauth.test.ts (6)
245
- ✓ test/unit/shared/storage.test.ts (3)
246
- · test/unit/server/session.test.ts (3)
247
- ✓ test/unit/utils.test.ts (4)
248
- stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationService > should exchange auth code for tokens and store them
286
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationService > should exchange auth code for tokens and store them
249
287
  BrowserAuthenticationService constructor {
250
288
  config: {
251
289
  clientId: 'mockClientId',
@@ -259,7 +297,7 @@ BrowserAuthenticationService constructor {
259
297
  BrowserAuthenticationInitiator constructor {
260
298
  clientId: 'mockClientId',
261
299
  redirectUrl: 'http://localhost/redirect',
262
- state: 'eyJ1dWlkIjoiNDkxNjU4Y2MtNGUxOS00ZmQyLWE1MjktYmZlM2Q5MmIwNDdjIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
300
+ state: 'eyJ1dWlkIjoiNWUzZjNkOTMtNmQxYi00Yzg4LWJjNTgtYTA1ODY0NjZiMDU4IiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
263
301
  scopes: [ 'openid', 'profile' ],
264
302
  displayMode: 'redirect',
265
303
  oauthServer: 'http://mockOauthServer',
@@ -348,7 +386,7 @@ BrowserAuthenticationService constructor {
348
386
  BrowserAuthenticationInitiator constructor {
349
387
  clientId: 'mockClientId',
350
388
  redirectUrl: 'http://localhost/redirect',
351
- state: 'eyJ1dWlkIjoiM2EzYmZlMGEtYmZjNC00Yjg0LWExMDktNGZhZjk0ODdlMjQ3IiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
389
+ state: 'eyJ1dWlkIjoiM2FjNmM0MDgtMTAxNS00ZGQ1LTk4ZjAtOTAxMmY2OGIxNTg5IiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
352
390
  scopes: [ 'openid', 'profile' ],
353
391
  displayMode: 'redirect',
354
392
  oauthServer: 'http://mockOauthServer',
@@ -415,68 +453,24 @@ BrowserAuthenticationInitiator constructor {
415
453
  ✓ test/unit/logger.test.ts (11)
416
454
  ✓ test/unit/services/AuthenticationService.test.ts (6)
417
455
  ✓ test/unit/nextjs/middleware.test.ts (7)
418
- · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
419
456
  · test/unit/services/ServerAuthenticationResolver.test.ts (5)
420
- · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
457
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
421
458
  ✓ test/unit/lib/oauth.test.ts (6)
422
459
  ✓ test/unit/shared/storage.test.ts (3)
423
460
  · test/unit/server/session.test.ts (3)
424
461
  ✓ test/unit/utils.test.ts (4)
425
- stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > init > should initialize OAuth2 client with resolved endpoints
426
- GenericAuthenticationRefresher constructor {
427
- authConfig: {
428
- clientId: 'mockClientId',
429
- oauthServer: 'http://mockOauthServer',
430
- redirectUrl: 'http://localhost/redirect'
431
- },
432
- endpointOverrides: undefined
433
- }
434
-
435
- stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > refreshTokens > should refresh tokens and store them
436
- GenericAuthenticationRefresher constructor {
437
- authConfig: {
438
- clientId: 'mockClientId',
439
- oauthServer: 'http://mockOauthServer',
440
- redirectUrl: 'http://localhost/redirect'
441
- },
442
- endpointOverrides: undefined
443
- }
444
-
445
- stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > refreshTokens > should throw an error if no refresh token is available
446
- GenericAuthenticationRefresher constructor {
447
- authConfig: {
448
- clientId: 'mockClientId',
449
- oauthServer: 'http://mockOauthServer',
450
- redirectUrl: 'http://localhost/redirect'
451
- },
452
- endpointOverrides: undefined
453
- }
454
-
455
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
462
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
456
463
  · test/unit/server/login.test.ts (6)
457
464
  ✓ test/unit/logger.test.ts (11)
458
465
  ✓ test/unit/services/AuthenticationService.test.ts (6)
459
466
  ✓ test/unit/nextjs/middleware.test.ts (7)
460
- · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
461
- · test/unit/services/ServerAuthenticationResolver.test.ts (5)
462
- · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
463
- ✓ test/unit/lib/oauth.test.ts (6)
464
- ✓ test/unit/shared/storage.test.ts (3)
465
- ✓ test/unit/server/session.test.ts (3)
466
- ✓ test/unit/utils.test.ts (4)
467
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
468
- ✓ test/unit/server/login.test.ts (6)
469
- ✓ test/unit/logger.test.ts (11)
470
- ✓ test/unit/services/AuthenticationService.test.ts (6)
471
- ✓ test/unit/nextjs/middleware.test.ts (7)
472
- · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
473
467
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
474
- · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
468
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
475
469
  ✓ test/unit/lib/oauth.test.ts (6)
476
470
  ✓ test/unit/shared/storage.test.ts (3)
477
471
  ✓ test/unit/server/session.test.ts (3)
478
472
  ✓ test/unit/utils.test.ts (4)
479
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
473
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
480
474
  ✓ test/unit/server/login.test.ts (6)
481
475
  ✓ test/unit/logger.test.ts (11)
482
476
  ✓ test/unit/services/AuthenticationService.test.ts (6)
@@ -488,45 +482,13 @@ GenericAuthenticationRefresher constructor {
488
482
  ✓ test/unit/shared/storage.test.ts (3)
489
483
  ✓ test/unit/server/session.test.ts (3)
490
484
  ✓ test/unit/utils.test.ts (4)
491
- stdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
485
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25lstdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
492
486
  handleIframeLoad
493
487
  sameDomainCodeExchangeRequired, calling callback URL again...
494
488
  handleIframeLoad
495
489
  sameDomainCodeExchangeRequired, calling callback URL again...
496
490
 
497
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
498
- ✓ test/unit/server/login.test.ts (6)
499
- ✓ test/unit/logger.test.ts (11)
500
- ✓ test/unit/services/AuthenticationService.test.ts (6)
501
- ✓ test/unit/nextjs/middleware.test.ts (7)
502
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
503
- ❯ CivicAuthIframeContainer (3)
504
- ⠙ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
505
- · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
506
- · does not call onClose if closeOnRedirect is false
507
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
508
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
509
- ✓ test/unit/lib/oauth.test.ts (6)
510
- ✓ test/unit/shared/storage.test.ts (3)
511
- ✓ test/unit/server/session.test.ts (3)
512
- ✓ test/unit/utils.test.ts (4)
513
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
514
- ✓ test/unit/server/login.test.ts (6)
515
- ✓ test/unit/logger.test.ts (11)
516
- ✓ test/unit/services/AuthenticationService.test.ts (6)
517
- ✓ test/unit/nextjs/middleware.test.ts (7)
518
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
519
- ❯ CivicAuthIframeContainer (3)
520
- ⠹ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
521
- · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
522
- · does not call onClose if closeOnRedirect is false
523
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
524
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
525
- ✓ test/unit/lib/oauth.test.ts (6)
526
- ✓ test/unit/shared/storage.test.ts (3)
527
- ✓ test/unit/server/session.test.ts (3)
528
- ✓ test/unit/utils.test.ts (4)
529
- stdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
491
+ stdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
530
492
  handleIframeLoad
531
493
  handleIframeLoad
532
494
 
@@ -537,86 +499,6 @@ handleIframeLoad
537
499
  sameDomainCodeExchangeRequired, calling callback URL again...
538
500
 
539
501
  [?25l ✓ test/unit/nextjs/config.test.ts (10)
540
- ✓ test/unit/server/login.test.ts (6)
541
- ✓ test/unit/logger.test.ts (11)
542
- ✓ test/unit/services/AuthenticationService.test.ts (6)
543
- ✓ test/unit/nextjs/middleware.test.ts (7)
544
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
545
- ❯ CivicAuthIframeContainer (3)
546
- ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
547
- ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
548
- ⠙ does not call onClose if closeOnRedirect is false
549
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
550
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
551
- ✓ test/unit/lib/oauth.test.ts (6)
552
- ✓ test/unit/shared/storage.test.ts (3)
553
- ✓ test/unit/server/session.test.ts (3)
554
- ✓ test/unit/utils.test.ts (4)
555
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
556
- ✓ test/unit/server/login.test.ts (6)
557
- ✓ test/unit/logger.test.ts (11)
558
- ✓ test/unit/services/AuthenticationService.test.ts (6)
559
- ✓ test/unit/nextjs/middleware.test.ts (7)
560
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
561
- ❯ CivicAuthIframeContainer (3)
562
- ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
563
- ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
564
- ⠹ does not call onClose if closeOnRedirect is false
565
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
566
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
567
- ✓ test/unit/lib/oauth.test.ts (6)
568
- ✓ test/unit/shared/storage.test.ts (3)
569
- ✓ test/unit/server/session.test.ts (3)
570
- ✓ test/unit/utils.test.ts (4)
571
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
572
- ✓ test/unit/server/login.test.ts (6)
573
- ✓ test/unit/logger.test.ts (11)
574
- ✓ test/unit/services/AuthenticationService.test.ts (6)
575
- ✓ test/unit/nextjs/middleware.test.ts (7)
576
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
577
- ❯ CivicAuthIframeContainer (3)
578
- ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
579
- ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
580
- ⠸ does not call onClose if closeOnRedirect is false
581
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
582
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
583
- ✓ test/unit/lib/oauth.test.ts (6)
584
- ✓ test/unit/shared/storage.test.ts (3)
585
- ✓ test/unit/server/session.test.ts (3)
586
- ✓ test/unit/utils.test.ts (4)
587
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
588
- ✓ test/unit/server/login.test.ts (6)
589
- ✓ test/unit/logger.test.ts (11)
590
- ✓ test/unit/services/AuthenticationService.test.ts (6)
591
- ✓ test/unit/nextjs/middleware.test.ts (7)
592
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
593
- ❯ CivicAuthIframeContainer (3)
594
- ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
595
- ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
596
- ⠼ does not call onClose if closeOnRedirect is false
597
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
598
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
599
- ✓ test/unit/lib/oauth.test.ts (6)
600
- ✓ test/unit/shared/storage.test.ts (3)
601
- ✓ test/unit/server/session.test.ts (3)
602
- ✓ test/unit/utils.test.ts (4)
603
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
604
- ✓ test/unit/server/login.test.ts (6)
605
- ✓ test/unit/logger.test.ts (11)
606
- ✓ test/unit/services/AuthenticationService.test.ts (6)
607
- ✓ test/unit/nextjs/middleware.test.ts (7)
608
- ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
609
- ❯ CivicAuthIframeContainer (3)
610
- ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
611
- ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
612
- ⠴ does not call onClose if closeOnRedirect is false
613
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
614
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
615
- ✓ test/unit/lib/oauth.test.ts (6)
616
- ✓ test/unit/shared/storage.test.ts (3)
617
- ✓ test/unit/server/session.test.ts (3)
618
- ✓ test/unit/utils.test.ts (4)
619
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
620
502
  ✓ test/unit/server/login.test.ts (6)
621
503
  ✓ test/unit/logger.test.ts (11)
622
504
  ✓ test/unit/services/AuthenticationService.test.ts (6)
@@ -628,7 +510,7 @@ sameDomainCodeExchangeRequired, calling callback URL again...
628
510
  ✓ test/unit/shared/storage.test.ts (3)
629
511
  ✓ test/unit/server/session.test.ts (3)
630
512
  ✓ test/unit/utils.test.ts (4)
631
- [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l · test/integration/sdk.test.tsx (2)
513
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l · test/integration/sdk.test.tsx (2)
632
514
  ✓ test/unit/nextjs/config.test.ts (10)
633
515
  ✓ test/unit/server/login.test.ts (6)
634
516
  ✓ test/unit/logger.test.ts (11)
@@ -641,7 +523,7 @@ sameDomainCodeExchangeRequired, calling callback URL again...
641
523
  ✓ test/unit/shared/storage.test.ts (3)
642
524
  ✓ test/unit/server/session.test.ts (3)
643
525
  ✓ test/unit/utils.test.ts (4)
644
- [?25lstdout | test/integration/sdk.test.tsx > OAuth login > should set the correct auth url for login with redirect
526
+ [?25l[?25l[?25lstdout | test/integration/sdk.test.tsx > OAuth login > should set the correct auth url for login with redirect
645
527
  BrowserAuthenticationService constructor {
646
528
  config: {
647
529
  clientId: 'test-client-id',
@@ -663,14 +545,14 @@ BrowserAuthenticationInitiator constructor {
663
545
  oauthServer: 'http://localhost:3001',
664
546
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
665
547
  displayMode: 'iframe',
666
- state: 'eyJ1dWlkIjoiMGZhZTdiMWEtZTUxYy00MjRlLThkMmItZGJjMWIwMWRhYjFiIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
548
+ state: 'eyJ1dWlkIjoiNzRlZjBlZjMtN2RiZS00NjZlLWIxNzMtZWRhMzBmNDZmZGE3IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
667
549
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
668
550
  }
669
551
  BrowserAuthenticationInitiator constructor {
670
552
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} },
671
553
  clientId: 'test-client-id',
672
554
  redirectUrl: 'http://localhost:3001/callback',
673
- state: 'eyJ1dWlkIjoiZTE1NDhiODgtM2YwMC00NmVhLWI2NTctODFjZGFhNDFlNDYxIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
555
+ state: 'eyJ1dWlkIjoiMTQ0YWQ3OGQtNDY3Mi00MTY3LWFkMzktZWQ2NDU2MTQwMTBmIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
674
556
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
675
557
  displayMode: 'redirect',
676
558
  oauthServer: 'http://localhost:3001',
@@ -698,11 +580,14 @@ BrowserAuthenticationInitiator constructor {
698
580
  oauthServer: 'http://localhost:3001',
699
581
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
700
582
  displayMode: 'redirect',
701
- state: 'eyJ1dWlkIjoiMzgxNzc4ODUtM2QwZC00MGZkLWIyNGItZDhhMTJhZjViN2IzIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
583
+ state: 'eyJ1dWlkIjoiMmM3ZjlmZjUtNjY2My00YjUxLTgwN2YtMzkxMjlmNWEzMjFlIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
702
584
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
703
585
  }
704
586
  handleIframeLoad
705
587
 
588
+ stdout | test/integration/sdk.test.tsx > OAuth login > should set the correct auth url for login with redirect
589
+ Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_id=test-client-id&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2Fcallback&scope=openid+profile+email&state=mock-state&code_challenge=mock-code-challenge&code_challenge_method=S256&code_challenge=qUmdgqlq8kCMG2ogmCQuKxBj7cLhzgSFoPB84-QwZM4&code_challenge_method=S256&prompt=consent
590
+
706
591
  [?25l ❯ test/integration/sdk.test.tsx (2)
707
592
  ❯ OAuth login (2)
708
593
  ⠙ should set the correct auth url for login with redirect
@@ -719,10 +604,7 @@ handleIframeLoad
719
604
  ✓ test/unit/shared/storage.test.ts (3)
720
605
  ✓ test/unit/server/session.test.ts (3)
721
606
  ✓ test/unit/utils.test.ts (4)
722
- stdout | test/integration/sdk.test.tsx > OAuth login > should set the correct auth url for login with redirect
723
- Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_id=test-client-id&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2Fcallback&scope=openid+profile+email&state=mock-state&code_challenge=mock-code-challenge&code_challenge_method=S256&code_challenge=qUmdgqlq8kCMG2ogmCQuKxBj7cLhzgSFoPB84-QwZM4&code_challenge_method=S256&prompt=consent
724
-
725
- [?25l ❯ test/integration/sdk.test.tsx (2)
607
+ [?25l ❯ test/integration/sdk.test.tsx (2)
726
608
  ❯ OAuth login (2)
727
609
  ⠹ should set the correct auth url for login with redirect
728
610
  · should initiate code exchange, validate tokens, and derive user from ID token
@@ -760,7 +642,7 @@ BrowserAuthenticationInitiator constructor {
760
642
  oauthServer: 'http://localhost:3001',
761
643
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
762
644
  displayMode: 'iframe',
763
- state: 'eyJ1dWlkIjoiMDYyMzE1NGYtOWVmMi00MjQxLWFkNTMtMGUwZGFkYzA4MTA5IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
645
+ state: 'eyJ1dWlkIjoiNDg1MTIyZDgtNThlOC00N2FlLTg5YjUtYjMxODdkMWM4ODgyIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
764
646
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
765
647
  }
766
648
  handleIframeLoad
@@ -821,6 +703,38 @@ window.history.replaceState failed DOMException {}
821
703
  ✓ test/unit/shared/storage.test.ts (3)
822
704
  ✓ test/unit/server/session.test.ts (3)
823
705
  ✓ test/unit/utils.test.ts (4)
706
+ [?25l ❯ test/integration/sdk.test.tsx (2)
707
+ ❯ OAuth login (2)
708
+ ✓ should set the correct auth url for login with redirect
709
+ ⠼ should initiate code exchange, validate tokens, and derive user from ID token
710
+ ✓ test/unit/nextjs/config.test.ts (10)
711
+ ✓ test/unit/server/login.test.ts (6)
712
+ ✓ test/unit/logger.test.ts (11)
713
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
714
+ ✓ test/unit/nextjs/middleware.test.ts (7)
715
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
716
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
717
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
718
+ ✓ test/unit/lib/oauth.test.ts (6)
719
+ ✓ test/unit/shared/storage.test.ts (3)
720
+ ✓ test/unit/server/session.test.ts (3)
721
+ ✓ test/unit/utils.test.ts (4)
722
+ [?25l ❯ test/integration/sdk.test.tsx (2)
723
+ ❯ OAuth login (2)
724
+ ✓ should set the correct auth url for login with redirect
725
+ ⠴ should initiate code exchange, validate tokens, and derive user from ID token
726
+ ✓ test/unit/nextjs/config.test.ts (10)
727
+ ✓ test/unit/server/login.test.ts (6)
728
+ ✓ test/unit/logger.test.ts (11)
729
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
730
+ ✓ test/unit/nextjs/middleware.test.ts (7)
731
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
732
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
733
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
734
+ ✓ test/unit/lib/oauth.test.ts (6)
735
+ ✓ test/unit/shared/storage.test.ts (3)
736
+ ✓ test/unit/server/session.test.ts (3)
737
+ ✓ test/unit/utils.test.ts (4)
824
738
  [?25l ✓ test/integration/sdk.test.tsx (2)
825
739
  ✓ test/unit/nextjs/config.test.ts (10)
826
740
  ✓ test/unit/server/login.test.ts (6)
@@ -834,8 +748,7 @@ window.history.replaceState failed DOMException {}
834
748
  ✓ test/unit/shared/storage.test.ts (3)
835
749
  ✓ test/unit/server/session.test.ts (3)
836
750
  ✓ test/unit/utils.test.ts (4)
837
- · test/unit/shared/UserSession.test.ts (2)
838
- stdout | test/unit/nextjs/getUser.test.ts
751
+ [?25l[?25lstdout | test/unit/nextjs/getUser.test.ts
839
752
  process.env.NODE_ENV: development
840
753
  defaultServerSecure: false
841
754
 
@@ -852,6 +765,19 @@ defaultServerSecure: false
852
765
  ✓ test/unit/shared/storage.test.ts (3)
853
766
  ✓ test/unit/server/session.test.ts (3)
854
767
  ✓ test/unit/utils.test.ts (4)
768
+ [?25l ✓ test/integration/sdk.test.tsx (2)
769
+ ✓ test/unit/nextjs/config.test.ts (10)
770
+ ✓ test/unit/server/login.test.ts (6)
771
+ ✓ test/unit/logger.test.ts (11)
772
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
773
+ ✓ test/unit/nextjs/middleware.test.ts (7)
774
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
775
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
776
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
777
+ ✓ test/unit/lib/oauth.test.ts (6)
778
+ ✓ test/unit/shared/storage.test.ts (3)
779
+ ✓ test/unit/server/session.test.ts (3)
780
+ ✓ test/unit/utils.test.ts (4)
855
781
  · test/unit/shared/UserSession.test.ts (2)
856
782
  [?25l ✓ test/integration/sdk.test.tsx (2)
857
783
  ✓ test/unit/nextjs/config.test.ts (10)
@@ -867,7 +793,7 @@ defaultServerSecure: false
867
793
  ✓ test/unit/server/session.test.ts (3)
868
794
  ✓ test/unit/utils.test.ts (4)
869
795
  ✓ test/unit/shared/UserSession.test.ts (2)
870
- [?25l[?25l ✓ test/integration/sdk.test.tsx (2)
796
+ [?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2)
871
797
  ✓ test/unit/nextjs/config.test.ts (10)
872
798
  ✓ test/unit/server/login.test.ts (6)
873
799
  ✓ test/unit/logger.test.ts (11)
@@ -882,6 +808,21 @@ defaultServerSecure: false
882
808
  ✓ test/unit/utils.test.ts (4)
883
809
  ✓ test/unit/shared/UserSession.test.ts (2)
884
810
  · test/unit/nextjs/utils.test.ts (1)
811
+ [?25l ✓ test/integration/sdk.test.tsx (2)
812
+ ✓ test/unit/nextjs/config.test.ts (10)
813
+ ✓ test/unit/server/login.test.ts (6)
814
+ ✓ test/unit/logger.test.ts (11)
815
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
816
+ ✓ test/unit/nextjs/middleware.test.ts (7)
817
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
818
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
819
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
820
+ ✓ test/unit/lib/oauth.test.ts (6)
821
+ ✓ test/unit/shared/storage.test.ts (3)
822
+ ✓ test/unit/server/session.test.ts (3)
823
+ ✓ test/unit/utils.test.ts (4)
824
+ ✓ test/unit/shared/UserSession.test.ts (2)
825
+ ✓ test/unit/nextjs/utils.test.ts (1)
885
826
  [?25l[?25l ✓ test/integration/sdk.test.tsx (2)
886
827
  ✓ test/unit/nextjs/config.test.ts (10)
887
828
  ✓ test/unit/server/login.test.ts (6)
@@ -895,9 +836,10 @@ defaultServerSecure: false
895
836
  ✓ test/unit/shared/storage.test.ts (3)
896
837
  ✓ test/unit/server/session.test.ts (3)
897
838
  ✓ test/unit/utils.test.ts (4)
839
+ · test/unit/react/components/SignInButton.test.tsx (2)
898
840
  ✓ test/unit/shared/UserSession.test.ts (2)
899
841
  ✓ test/unit/nextjs/utils.test.ts (1)
900
- [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2)
842
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2)
901
843
  ✓ test/unit/nextjs/config.test.ts (10)
902
844
  ✓ test/unit/server/login.test.ts (6)
903
845
  ✓ test/unit/logger.test.ts (11)
@@ -911,9 +853,10 @@ defaultServerSecure: false
911
853
  ✓ test/unit/server/session.test.ts (3)
912
854
  ✓ test/unit/utils.test.ts (4)
913
855
  · test/unit/react/components/SignInButton.test.tsx (2)
856
+ · test/unit/react/components/SignOutButton.test.tsx (2)
914
857
  ✓ test/unit/shared/UserSession.test.ts (2)
915
858
  ✓ test/unit/nextjs/utils.test.ts (1)
916
- [?25l ✓ test/integration/sdk.test.tsx (2)
859
+ [?25l ✓ test/integration/sdk.test.tsx (2)
917
860
  ✓ test/unit/nextjs/config.test.ts (10)
918
861
  ✓ test/unit/server/login.test.ts (6)
919
862
  ✓ test/unit/logger.test.ts (11)
@@ -928,9 +871,9 @@ defaultServerSecure: false
928
871
  ✓ test/unit/utils.test.ts (4)
929
872
  · test/unit/react/components/SignInButton.test.tsx (2)
930
873
  · test/unit/react/components/SignOutButton.test.tsx (2)
874
+ · test/unit/nextjs/getUser.test.ts (1)
931
875
  ✓ test/unit/shared/UserSession.test.ts (2)
932
876
  ✓ test/unit/nextjs/utils.test.ts (1)
933
- · test/unit/publicApi/apiSnapshot.test.ts (1)
934
877
  [?25l ✓ test/integration/sdk.test.tsx (2)
935
878
  ✓ test/unit/nextjs/config.test.ts (10)
936
879
  ✓ test/unit/server/login.test.ts (6)
@@ -947,8 +890,8 @@ defaultServerSecure: false
947
890
  · test/unit/react/components/SignInButton.test.tsx (2)
948
891
  · test/unit/react/components/SignOutButton.test.tsx (2)
949
892
  · test/unit/nextjs/getUser.test.ts (1)
950
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
951
893
  ✓ test/unit/shared/UserSession.test.ts (2)
894
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
952
895
  ✓ test/unit/nextjs/utils.test.ts (1)
953
896
  · test/unit/publicApi/apiSnapshot.test.ts (1)
954
897
  [?25l ✓ test/integration/sdk.test.tsx (2)
@@ -967,10 +910,10 @@ defaultServerSecure: false
967
910
  · test/unit/react/components/SignInButton.test.tsx (2)
968
911
  · test/unit/react/components/SignOutButton.test.tsx (2)
969
912
  ✓ test/unit/nextjs/getUser.test.ts (1)
970
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
971
913
  ✓ test/unit/shared/UserSession.test.ts (2)
914
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
972
915
  ✓ test/unit/nextjs/utils.test.ts (1)
973
- ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
916
+ · test/unit/publicApi/apiSnapshot.test.ts (1)
974
917
  stdout | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should render a SignInButton component
975
918
  BrowserAuthenticationService constructor {
976
919
  config: {
@@ -993,7 +936,7 @@ BrowserAuthenticationInitiator constructor {
993
936
  oauthServer: 'https://auth.civic.com/oauth',
994
937
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
995
938
  displayMode: 'iframe',
996
- state: 'eyJ1dWlkIjoiNmRlMGZhMzMtZDBkMS00YWFjLWE4ZTgtYzk5M2QyZTkyODkwIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
939
+ state: 'eyJ1dWlkIjoiYzY0MjhjZWItY2NjYi00ZWFjLTg1NTAtNmE5NjFmNDU1OWI1IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
997
940
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
998
941
  }
999
942
  handleIframeLoad
@@ -1041,7 +984,7 @@ BrowserAuthenticationInitiator constructor {
1041
984
  oauthServer: 'https://auth.civic.com/oauth',
1042
985
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1043
986
  displayMode: 'iframe',
1044
- state: 'eyJ1dWlkIjoiMzdkMGM2MzAtYTU2ZS00MDU1LWI2NDktZWU0NTkxOGZmOTBkIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
987
+ state: 'eyJ1dWlkIjoiODNlOTcxMWItZWIwNi00OGE0LWI2OTctMDJjNWQ5MjE0NDJlIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1045
988
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1046
989
  }
1047
990
  handleIframeLoad
@@ -1067,27 +1010,7 @@ This ensures that you're testing the behavior the user would see in the browser.
1067
1010
  at QueryClientProvider (file:///Users/flippie/civic/repos/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1068
1011
  at CivicAuthProvider (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1069
1012
 
1070
- [?25l ✓ test/integration/sdk.test.tsx (2)
1071
- ✓ test/unit/nextjs/config.test.ts (10)
1072
- ✓ test/unit/server/login.test.ts (6)
1073
- ✓ test/unit/logger.test.ts (11)
1074
- ✓ test/unit/services/AuthenticationService.test.ts (6)
1075
- ✓ test/unit/nextjs/middleware.test.ts (7)
1076
- ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1077
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1078
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1079
- ✓ test/unit/lib/oauth.test.ts (6)
1080
- ✓ test/unit/shared/storage.test.ts (3)
1081
- ✓ test/unit/server/session.test.ts (3)
1082
- ✓ test/unit/utils.test.ts (4)
1083
- · test/unit/react/components/SignInButton.test.tsx (2)
1084
- · test/unit/react/components/SignOutButton.test.tsx (2)
1085
- ✓ test/unit/nextjs/getUser.test.ts (1)
1086
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1087
- ✓ test/unit/shared/UserSession.test.ts (2)
1088
- ✓ test/unit/nextjs/utils.test.ts (1)
1089
- ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1090
- stdout | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should render a SignOutButton component
1013
+ stdout | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should render a SignOutButton component
1091
1014
  BrowserAuthenticationService constructor {
1092
1015
  config: {
1093
1016
  clientId: 'test-client-id',
@@ -1109,7 +1032,7 @@ BrowserAuthenticationInitiator constructor {
1109
1032
  oauthServer: 'https://auth.civic.com/oauth',
1110
1033
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1111
1034
  displayMode: 'iframe',
1112
- state: 'eyJ1dWlkIjoiZGQ1ODBkNzgtZTA1Ny00NzgxLWExNWEtMWJkZjdlNjFhZWE1IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1035
+ state: 'eyJ1dWlkIjoiZWY3ZDIwYzEtNWUwOS00NDVkLWJkMDAtNjkzYTA5MTQwZWJlIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1113
1036
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1114
1037
  }
1115
1038
  handleIframeLoad
@@ -1135,33 +1058,6 @@ This ensures that you're testing the behavior the user would see in the browser.
1135
1058
  at QueryClientProvider (file:///Users/flippie/civic/repos/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1136
1059
  at CivicAuthProvider (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1137
1060
 
1138
- stdout | test/unit/nextjs/NextAuthProvider.test.tsx > CivicNextAuthProvider > should call resolveAuthConfig with no arguments
1139
- BrowserAuthenticationService constructor {
1140
- config: {
1141
- clientId: 'test-client-id',
1142
- redirectUrl: 'https://example.com/callback',
1143
- oauthServer: 'https://example.com',
1144
- scopes: [
1145
- 'openid',
1146
- 'profile',
1147
- 'email',
1148
- 'forwardedTokens',
1149
- 'offline_access'
1150
- ],
1151
- displayMode: 'iframe'
1152
- }
1153
- }
1154
- BrowserAuthenticationInitiator constructor {
1155
- clientId: 'test-client-id',
1156
- redirectUrl: 'https://example.com/callback',
1157
- oauthServer: 'https://example.com',
1158
- scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1159
- displayMode: 'iframe',
1160
- state: 'eyJ1dWlkIjoiMzNiMGQ4MmEtOTc0My00NzQ4LWE5YmQtNTU2YWUxNzcyOTMyIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1161
- pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1162
- }
1163
- handleIframeLoad
1164
-
1165
1061
  stdout | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should call signIn when the button is clicked
1166
1062
  BrowserAuthenticationService constructor {
1167
1063
  config: {
@@ -1184,7 +1080,7 @@ BrowserAuthenticationInitiator constructor {
1184
1080
  oauthServer: 'https://auth.civic.com/oauth',
1185
1081
  scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1186
1082
  displayMode: 'iframe',
1187
- state: 'eyJ1dWlkIjoiNDk3Nzk0YjItZmM5Yy00NDJiLWExYjUtZWM2YTc2YTBmZmI2IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1083
+ state: 'eyJ1dWlkIjoiM2NlYjUwZWItN2RlOS00ZDhkLWJkYzMtY2I4YzkyOGQ1NzY4IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1188
1084
  pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1189
1085
  }
1190
1086
  handleIframeLoad
@@ -1210,6 +1106,53 @@ This ensures that you're testing the behavior the user would see in the browser.
1210
1106
  at QueryClientProvider (file:///Users/flippie/civic/repos/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1211
1107
  at CivicAuthProvider (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1212
1108
 
1109
+ [?25l ✓ test/integration/sdk.test.tsx (2)
1110
+ ✓ test/unit/nextjs/config.test.ts (10)
1111
+ ✓ test/unit/server/login.test.ts (6)
1112
+ ✓ test/unit/logger.test.ts (11)
1113
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1114
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1115
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1116
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1117
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1118
+ ✓ test/unit/lib/oauth.test.ts (6)
1119
+ ✓ test/unit/shared/storage.test.ts (3)
1120
+ ✓ test/unit/server/session.test.ts (3)
1121
+ ✓ test/unit/utils.test.ts (4)
1122
+ · test/unit/react/components/SignInButton.test.tsx (2)
1123
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1124
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1125
+ ✓ test/unit/shared/UserSession.test.ts (2)
1126
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1127
+ ✓ test/unit/nextjs/utils.test.ts (1)
1128
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1129
+ [?25lstdout | test/unit/nextjs/NextAuthProvider.test.tsx > CivicNextAuthProvider > should call resolveAuthConfig with no arguments
1130
+ BrowserAuthenticationService constructor {
1131
+ config: {
1132
+ clientId: 'test-client-id',
1133
+ redirectUrl: 'https://example.com/callback',
1134
+ oauthServer: 'https://example.com',
1135
+ scopes: [
1136
+ 'openid',
1137
+ 'profile',
1138
+ 'email',
1139
+ 'forwardedTokens',
1140
+ 'offline_access'
1141
+ ],
1142
+ displayMode: 'iframe'
1143
+ }
1144
+ }
1145
+ BrowserAuthenticationInitiator constructor {
1146
+ clientId: 'test-client-id',
1147
+ redirectUrl: 'https://example.com/callback',
1148
+ oauthServer: 'https://example.com',
1149
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1150
+ displayMode: 'iframe',
1151
+ state: 'eyJ1dWlkIjoiZTg3OWE5NmEtOWVhOS00MDhmLWIyMDMtNzMwMDdhZGJkNmU4IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1152
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1153
+ }
1154
+ handleIframeLoad
1155
+
1213
1156
  stderr | test/unit/nextjs/NextAuthProvider.test.tsx > CivicNextAuthProvider > should call resolveAuthConfig with no arguments
1214
1157
  Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1215
1158
 
@@ -1233,26 +1176,6 @@ This ensures that you're testing the behavior the user would see in the browser.
1233
1176
  at CivicNextAuthProvider (/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/src/nextjs/providers/NextAuthProvider.tsx:75:3)
1234
1177
 
1235
1178
  [?25l ✓ test/integration/sdk.test.tsx (2)
1236
- ✓ test/unit/nextjs/config.test.ts (10)
1237
- ✓ test/unit/server/login.test.ts (6)
1238
- ✓ test/unit/logger.test.ts (11)
1239
- ✓ test/unit/services/AuthenticationService.test.ts (6)
1240
- ✓ test/unit/nextjs/middleware.test.ts (7)
1241
- ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1242
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1243
- ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1244
- ✓ test/unit/lib/oauth.test.ts (6)
1245
- ✓ test/unit/shared/storage.test.ts (3)
1246
- ✓ test/unit/server/session.test.ts (3)
1247
- ✓ test/unit/utils.test.ts (4)
1248
- · test/unit/react/components/SignInButton.test.tsx (2)
1249
- · test/unit/react/components/SignOutButton.test.tsx (2)
1250
- ✓ test/unit/nextjs/getUser.test.ts (1)
1251
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1252
- ✓ test/unit/shared/UserSession.test.ts (2)
1253
- ✓ test/unit/nextjs/utils.test.ts (1)
1254
- ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1255
- [?25l ✓ test/integration/sdk.test.tsx (2)
1256
1179
  ✓ test/unit/nextjs/config.test.ts (10)
1257
1180
  ✓ test/unit/server/login.test.ts (6)
1258
1181
  ✓ test/unit/logger.test.ts (11)
@@ -1266,13 +1189,13 @@ This ensures that you're testing the behavior the user would see in the browser.
1266
1189
  ✓ test/unit/server/session.test.ts (3)
1267
1190
  ✓ test/unit/utils.test.ts (4)
1268
1191
  ✓ test/unit/react/components/SignInButton.test.tsx (2)
1269
- · test/unit/react/components/SignOutButton.test.tsx (2)
1192
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1270
1193
  ✓ test/unit/nextjs/getUser.test.ts (1)
1271
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1272
1194
  ✓ test/unit/shared/UserSession.test.ts (2)
1195
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1273
1196
  ✓ test/unit/nextjs/utils.test.ts (1)
1274
1197
  ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1275
- [?25l ✓ test/integration/sdk.test.tsx (2)
1198
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2)
1276
1199
  ✓ test/unit/nextjs/config.test.ts (10)
1277
1200
  ✓ test/unit/server/login.test.ts (6)
1278
1201
  ✓ test/unit/logger.test.ts (11)
@@ -1288,155 +1211,154 @@ This ensures that you're testing the behavior the user would see in the browser.
1288
1211
  ✓ test/unit/react/components/SignInButton.test.tsx (2)
1289
1212
  ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1290
1213
  ✓ test/unit/nextjs/getUser.test.ts (1)
1291
- ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1292
1214
  ✓ test/unit/shared/UserSession.test.ts (2)
1215
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1293
1216
  ✓ test/unit/nextjs/utils.test.ts (1)
1294
1217
  ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1295
- [?25l[?25l[?25l ✓ test/unit/logger.test.ts (11)
1218
+ [?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2)
1219
+ ✓ test/unit/logger.test.ts (11)
1296
1220
  ✓ test/unit/utils.test.ts (4)
1297
- ✓ test/integration/sdk.test.tsx (2)
1298
1221
  ✓ test/unit/lib/oauth.test.ts (6)
1299
- ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1300
- ✓ test/unit/nextjs/config.test.ts (10)
1301
- ✓ test/unit/nextjs/getUser.test.ts (1)
1302
- ✓ test/unit/nextjs/middleware.test.ts (7)
1303
- ✓ test/unit/nextjs/utils.test.ts (1)
1304
1222
  ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1223
+ ✓ test/unit/server/login.test.ts (6)
1224
+ ✓ test/unit/server/session.test.ts (3)
1305
1225
  ✓ test/unit/services/AuthenticationService.test.ts (6)
1306
1226
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1307
1227
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1308
1228
  ✓ test/unit/shared/UserSession.test.ts (2)
1309
1229
  ✓ test/unit/shared/storage.test.ts (3)
1310
- ✓ test/unit/server/login.test.ts (6)
1311
- ✓ test/unit/server/session.test.ts (3)
1230
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1231
+ ✓ test/unit/nextjs/config.test.ts (10)
1232
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1233
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1234
+ ✓ test/unit/nextjs/utils.test.ts (1)
1235
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1312
1236
  ✓ test/unit/react/components/SignInButton.test.tsx (2)
1313
1237
  ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1314
- ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1315
1238
 
1316
-  Snapshots  1 written
1317
1239
   Test Files  20 passed (20)
1318
1240
   Tests  79 passed (79)
1319
-  Start at  15:41:48
1320
-  Duration  1.96s (transform 746ms, setup 0ms, collect 3.35s, tests 532ms, environment 11.02s, prepare 1.54s)
1241
+  Start at  16:36:04
1242
+  Duration  2.66s (transform 766ms, setup 0ms, collect 4.33s, tests 557ms, environment 14.37s, prepare 2.13s)
1321
1243
 
1322
1244
   % Coverage report from v8
1323
- -----------------------------------------|---------|----------|---------|---------|-------------------------------------
1324
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1325
- -----------------------------------------|---------|----------|---------|---------|-------------------------------------
1326
- All files  |  80.49 |  85.94 |  70.76 |  80.49 |  
1327
-  src  |  100 |  100 |  100 |  100 |  
1328
-  config.ts  |  100 |  100 |  100 |  100 |  
1329
-  constants.ts  |  100 |  100 |  100 |  100 |  
1330
- index.ts | 0 | 0 | 0 | 0 |  
1331
- types.ts | 0 | 0 | 0 | 0 |  
1332
-  utils.ts  |  100 |  100 |  100 |  100 |  
1333
-  src/browser  |  100 |  100 |  100 |  100 |  
1334
-  storage.ts  |  100 |  100 |  100 |  100 |  
1335
-  src/lib  |  70.87 |  81.48 |  83.33 |  70.87 |  
1336
-  cookies.ts  |  4.16 |  100 |  0 |  4.16 | 2-27 
1337
-  jwt.ts  |  100 |  100 |  100 |  100 |  
1338
-  logger.ts  |  100 |  100 |  100 |  100 |  
1339
-  oauth.ts  |  83.63 |  81.81 |  83.33 |  83.63 | 6,68-75 
1340
-  postMessage.ts  |  5.55 |  100 |  0 |  5.55 | 4-20 
1341
-  windowUtil.ts  |  82.6 |  57.14 |  100 |  82.6 | 6-7,11-12 
1342
-  src/nextjs  |  47.17 |  86.04 |  40.74 |  47.17 |  
1343
-  GetUser.ts  |  100 |  33.33 |  100 |  100 | 14-20 
1344
-  config.ts  |  99.2 |  81.25 |  100 |  99.2 | 126 
1345
-  cookies.ts  |  19.09 |  100 |  10 |  19.09 | ...,123-124,127-139,152-153,156-157
1346
-  index.ts  |  100 |  100 |  100 |  100 |  
1347
-  middleware.ts  |  100 |  95.45 |  100 |  100 | 49 
1348
-  routeHandler.ts  |  4.23 |  100 |  0 |  4.23 | 29-34,42-211,220-255,271-301 
1349
-  utils.ts  |  100 |  100 |  100 |  100 |  
1350
-  src/nextjs/hooks  |  11.29 |  100 |  0 |  11.29 |  
1351
-  index.ts  |  100 |  100 |  100 |  100 |  
1352
-  useTokenCookie.ts  |  9.67 |  100 |  0 |  9.67 | 9-14,17-41 
1353
-  useUserCookie.ts  |  10 |  100 |  0 |  10 | 10-14,17-41 
1354
-  src/nextjs/middleware  |  100 |  100 |  100 |  100 |  
1355
-  index.ts  |  100 |  100 |  100 |  100 |  
1356
-  src/nextjs/providers  |  87.93 |  71.42 |  66.66 |  87.93 |  
1357
-  NextAuthProvider.tsx  |  87.93 |  71.42 |  66.66 |  87.93 | 47-53 
1358
-  src/reactjs  |  100 |  100 |  100 |  100 |  
1359
-  index.ts  |  100 |  100 |  100 |  100 |  
1360
-  src/reactjs/components  |  19.81 |  100 |  57.14 |  19.81 |  
1361
-  SignInButton.tsx  |  100 |  100 |  100 |  100 |  
1362
-  SignOutButton.tsx  |  100 |  100 |  100 |  100 |  
1363
-  UserButton.tsx  |  2.29 |  100 |  0 |  2.29 | 7-20,24-37,41-213 
1364
-  index.ts  |  100 |  100 |  100 |  100 |  
1365
-  src/reactjs/hooks  |  44.44 |  33.33 |  50 |  44.44 |  
1366
-  index.ts  |  100 |  100 |  100 |  100 |  
1367
-  useAuth.ts  |  0 |  0 |  0 |  0 | 1-13 
1368
-  useUser.ts  |  77.77 |  50 |  100 |  77.77 | 14-15 
1369
-  src/reactjs/providers  |  100 |  100 |  100 |  100 |  
1370
-  index.ts  |  100 |  100 |  100 |  100 |  
1371
-  src/server  |  86.04 |  73.68 |  76.92 |  86.04 |  
1372
-  ServerAuthenticationResolver.ts  |  97.4 |  88.88 |  85.71 |  97.4 | 36-37 
1373
- config.ts | 0 | 0 | 0 | 0 |  
1374
-  index.ts  |  0 |  0 |  0 |  0 | 1 
1375
-  login.ts  |  100 |  71.42 |  100 |  100 | 23,52 
1376
-  refresh.ts  |  0 |  0 |  0 |  0 | 1-23 
1377
-  src/services  |  69.81 |  72.72 |  84 |  69.81 |  
1378
-  AuthenticationService.ts  |  69.31 |  67.85 |  88.88 |  69.31 | ...,110-113,118-130,273-274,305-323
1379
-  PKCE.ts  |  77.77 |  100 |  83.33 |  77.77 | 12-17 
1380
-  types.ts  |  50 |  100 |  0 |  50 | 51-53 
1381
-  src/shared/components  |  93.36 |  86.36 |  71.42 |  93.36 |  
1382
-  CivicAuthIframe.tsx  |  100 |  100 |  100 |  100 |  
1383
-  CivicAuthIframeContainer.tsx  |  90.2 |  84.21 |  60 |  90.2 | 15-22,128-129,144-147,162-163 
1384
-  CloseIcon.tsx  |  100 |  100 |  100 |  100 |  
1385
-  LoadingIcon.tsx  |  100 |  100 |  100 |  100 |  
1386
-  src/shared/hooks  |  75.6 |  50 |  100 |  75.6 |  
1387
-  index.ts  |  100 |  100 |  100 |  100 |  
1388
-  useAuth.ts  |  75 |  50 |  100 |  75 | 9-10 
1389
-  useConfig.ts  |  75 |  50 |  100 |  75 | 9-10 
1390
-  useIframe.ts  |  75 |  50 |  100 |  75 | 9-10 
1391
-  useSession.ts  |  75 |  50 |  100 |  75 | 9-10 
1392
-  useToken.ts  |  75 |  50 |  100 |  75 | 9-10 
1393
-  src/shared/lib  |  92.85 |  86 |  90.9 |  92.85 |  
1394
-  GenericAuthenticationRefresher.ts  |  100 |  85.71 |  100 |  100 | 60 
1395
-  UserSession.ts  |  100 |  87.5 |  100 |  100 | 22 
1396
-  session.ts  |  100 |  100 |  100 |  100 |  
1397
-  storage.ts  |  100 |  100 |  100 |  100 |  
1398
-  types.ts  |  100 |  100 |  100 |  100 |  
1399
-  util.ts  |  88.15 |  75 |  81.81 |  88.15 | 26-28,81-82,90-101,133-137,162-164 
1400
-  src/shared/providers  |  85.36 |  77.01 |  61.11 |  85.36 |  
1401
-  AuthContext.tsx  |  100 |  100 |  100 |  100 |  
1402
-  AuthProvider.tsx  |  80.06 |  72.13 |  50 |  80.06 | ...,313-315,317-318,329-330,375-379
1403
-  CivicAuthProvider.tsx  |  100 |  100 |  100 |  100 |  
1404
-  ConfigProvider.tsx  |  100 |  100 |  100 |  100 |  
1405
-  IframeProvider.tsx  |  100 |  100 |  50 |  100 |  
1406
-  SessionProvider.tsx  |  100 |  100 |  100 |  100 |  
1407
-  TokenProvider.tsx  |  88.88 |  84.61 |  33.33 |  88.88 | 30-31,34-35,49 
1408
-  UserProvider.tsx  |  95.45 |  87.5 |  100 |  95.45 | 42-43 
1409
-  test/integration  |  98.96 |  94.11 |  100 |  98.96 |  
1410
-  sdk.test.tsx  |  98.96 |  94.11 |  100 |  98.96 | 31-32 
1411
-  test/support  |  100 |  100 |  100 |  100 |  
1412
-  fixtures.ts  |  100 |  100 |  100 |  100 |  
1413
-  test/unit  |  100 |  100 |  100 |  100 |  
1414
-  logger.test.ts  |  100 |  100 |  100 |  100 |  
1415
-  utils.test.ts  |  100 |  100 |  100 |  100 |  
1416
-  test/unit/lib  |  100 |  100 |  100 |  100 |  
1417
-  oauth.test.ts  |  100 |  100 |  100 |  100 |  
1418
-  test/unit/nextjs  |  99.7 |  97.67 |  100 |  99.7 |  
1419
-  NextAuthProvider.test.tsx  |  100 |  100 |  100 |  100 |  
1420
-  config.test.ts  |  100 |  100 |  100 |  100 |  
1421
-  getUser.test.ts  |  97.29 |  87.5 |  100 |  97.29 | 31 
1422
-  middleware.test.ts  |  100 |  100 |  100 |  100 |  
1423
-  utils.test.ts  |  100 |  100 |  100 |  100 |  
1424
-  test/unit/publicApi  |  100 |  100 |  100 |  100 |  
1425
-  apiSnapshot.test.ts  |  100 |  100 |  100 |  100 |  
1426
-  test/unit/react/components  |  100 |  100 |  0 |  100 |  
1427
-  SignInButton.test.tsx  |  100 |  100 |  0 |  100 |  
1428
-  SignOutButton.test.tsx  |  100 |  100 |  0 |  100 |  
1429
-  test/unit/server  |  97.7 |  76.19 |  33.33 |  97.7 |  
1430
-  login.test.ts  |  97.12 |  68.75 |  33.33 |  97.12 | 23-24,27-28 
1431
-  session.test.ts  |  100 |  100 |  100 |  100 |  
1432
-  test/unit/services  |  100 |  100 |  100 |  100 |  
1433
-  AuthenticationService.test.ts  |  100 |  100 |  100 |  100 |  
1434
-  ServerAuthenticationResolver.test.ts  |  100 |  100 |  100 |  100 |  
1435
-  test/unit/shared  |  100 |  100 |  100 |  100 |  
1436
-  GenericAuthenticationRefresher.test.ts |  100 |  100 |  100 |  100 |  
1437
-  UserSession.test.ts  |  100 |  100 |  100 |  100 |  
1438
-  storage.test.ts  |  100 |  100 |  100 |  100 |  
1439
-  test/unit/shared/components  |  100 |  100 |  100 |  100 |  
1440
-  CivicAuthIframeContainer.test.tsx  |  100 |  100 |  100 |  100 |  
1441
- -----------------------------------------|---------|----------|---------|---------|-------------------------------------
1245
+ --------------------------------------|---------|----------|---------|---------|-------------------
1246
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1247
+ --------------------------------------|---------|----------|---------|---------|-------------------
1248
+ All files  |  80.49 |  85.94 |  70.76 |  80.49 |  
1249
+  src  |  100 |  100 |  100 |  100 |  
1250
+  config.ts  |  100 |  100 |  100 |  100 |  
1251
+  constants.ts  |  100 |  100 |  100 |  100 |  
1252
+ index.ts | 0 | 0 | 0 | 0 |  
1253
+ types.ts | 0 | 0 | 0 | 0 |  
1254
+  utils.ts  |  100 |  100 |  100 |  100 |  
1255
+  src/browser  |  100 |  100 |  100 |  100 |  
1256
+  storage.ts  |  100 |  100 |  100 |  100 |  
1257
+  src/lib  |  70.87 |  81.48 |  83.33 |  70.87 |  
1258
+  cookies.ts  |  4.16 |  100 |  0 |  4.16 | 2-27 
1259
+  jwt.ts  |  100 |  100 |  100 |  100 |  
1260
+  logger.ts  |  100 |  100 |  100 |  100 |  
1261
+  oauth.ts  |  83.63 |  81.81 |  83.33 |  83.63 | 6,68-75 
1262
+  postMessage.ts  |  5.55 |  100 |  0 |  5.55 | 4-20 
1263
+  windowUtil.ts  |  82.6 |  57.14 |  100 |  82.6 | 6-7,11-12 
1264
+  src/nextjs  |  47.17 |  86.04 |  40.74 |  47.17 |  
1265
+  GetUser.ts  |  100 |  33.33 |  100 |  100 | 14-20 
1266
+  config.ts  |  99.2 |  81.25 |  100 |  99.2 | 126 
1267
+  cookies.ts  |  19.09 |  100 |  10 |  19.09 | ...52-153,156-157
1268
+  index.ts  |  100 |  100 |  100 |  100 |  
1269
+  middleware.ts  |  100 |  95.45 |  100 |  100 | 49 
1270
+  routeHandler.ts  |  4.23 |  100 |  0 |  4.23 | ...20-255,271-301
1271
+  utils.ts  |  100 |  100 |  100 |  100 |  
1272
+  src/nextjs/hooks  |  11.29 |  100 |  0 |  11.29 |  
1273
+  index.ts  |  100 |  100 |  100 |  100 |  
1274
+  useTokenCookie.ts  |  9.67 |  100 |  0 |  9.67 | 9-14,17-41 
1275
+  useUserCookie.ts  |  10 |  100 |  0 |  10 | 10-14,17-41 
1276
+  src/nextjs/middleware  |  100 |  100 |  100 |  100 |  
1277
+  index.ts  |  100 |  100 |  100 |  100 |  
1278
+  src/nextjs/providers  |  87.93 |  71.42 |  66.66 |  87.93 |  
1279
+  NextAuthProvider.tsx  |  87.93 |  71.42 |  66.66 |  87.93 | 47-53 
1280
+  src/reactjs  |  100 |  100 |  100 |  100 |  
1281
+  index.ts  |  100 |  100 |  100 |  100 |  
1282
+  src/reactjs/components  |  19.81 |  100 |  57.14 |  19.81 |  
1283
+  SignInButton.tsx  |  100 |  100 |  100 |  100 |  
1284
+  SignOutButton.tsx  |  100 |  100 |  100 |  100 |  
1285
+  UserButton.tsx  |  2.29 |  100 |  0 |  2.29 | 7-20,24-37,41-213
1286
+  index.ts  |  100 |  100 |  100 |  100 |  
1287
+  src/reactjs/hooks  |  44.44 |  33.33 |  50 |  44.44 |  
1288
+  index.ts  |  100 |  100 |  100 |  100 |  
1289
+  useAuth.ts  |  0 |  0 |  0 |  0 | 1-13 
1290
+  useUser.ts  |  77.77 |  50 |  100 |  77.77 | 14-15 
1291
+  src/reactjs/providers  |  100 |  100 |  100 |  100 |  
1292
+  index.ts  |  100 |  100 |  100 |  100 |  
1293
+  src/server  |  86.04 |  73.68 |  76.92 |  86.04 |  
1294
+  ServerAuthenticationResolver.ts  |  97.4 |  88.88 |  85.71 |  97.4 | 36-37 
1295
+ config.ts | 0 | 0 | 0 | 0 |  
1296
+  index.ts  |  0 |  0 |  0 |  0 | 1 
1297
+  login.ts  |  100 |  71.42 |  100 |  100 | 23,52 
1298
+  refresh.ts  |  0 |  0 |  0 |  0 | 1-23 
1299
+  src/services  |  69.81 |  72.72 |  84 |  69.81 |  
1300
+  AuthenticationService.ts  |  69.31 |  67.85 |  88.88 |  69.31 | ...73-274,305-323
1301
+  PKCE.ts  |  77.77 |  100 |  83.33 |  77.77 | 12-17 
1302
+  types.ts  |  50 |  100 |  0 |  50 | 51-53 
1303
+  src/shared/components  |  93.36 |  86.36 |  71.42 |  93.36 |  
1304
+  CivicAuthIframe.tsx  |  100 |  100 |  100 |  100 |  
1305
+  CivicAuthIframeContainer.tsx  |  90.2 |  84.21 |  60 |  90.2 | ...44-147,162-163
1306
+  CloseIcon.tsx  |  100 |  100 |  100 |  100 |  
1307
+  LoadingIcon.tsx  |  100 |  100 |  100 |  100 |  
1308
+  src/shared/hooks  |  75.6 |  50 |  100 |  75.6 |  
1309
+  index.ts  |  100 |  100 |  100 |  100 |  
1310
+  useAuth.ts  |  75 |  50 |  100 |  75 | 9-10 
1311
+  useConfig.ts  |  75 |  50 |  100 |  75 | 9-10 
1312
+  useIframe.ts  |  75 |  50 |  100 |  75 | 9-10 
1313
+  useSession.ts  |  75 |  50 |  100 |  75 | 9-10 
1314
+  useToken.ts  |  75 |  50 |  100 |  75 | 9-10 
1315
+  src/shared/lib  |  92.85 |  86 |  90.9 |  92.85 |  
1316
+  GenericAuthenticationRefresher.ts  |  100 |  85.71 |  100 |  100 | 60 
1317
+  UserSession.ts  |  100 |  87.5 |  100 |  100 | 22 
1318
+  session.ts  |  100 |  100 |  100 |  100 |  
1319
+  storage.ts  |  100 |  100 |  100 |  100 |  
1320
+  types.ts  |  100 |  100 |  100 |  100 |  
1321
+  util.ts  |  88.15 |  75 |  81.81 |  88.15 | ...33-137,162-164
1322
+  src/shared/providers  |  85.36 |  77.01 |  61.11 |  85.36 |  
1323
+  AuthContext.tsx  |  100 |  100 |  100 |  100 |  
1324
+  AuthProvider.tsx  |  80.06 |  72.13 |  50 |  80.06 | ...29-330,375-379
1325
+  CivicAuthProvider.tsx  |  100 |  100 |  100 |  100 |  
1326
+  ConfigProvider.tsx  |  100 |  100 |  100 |  100 |  
1327
+  IframeProvider.tsx  |  100 |  100 |  50 |  100 |  
1328
+  SessionProvider.tsx  |  100 |  100 |  100 |  100 |  
1329
+  TokenProvider.tsx  |  88.88 |  84.61 |  33.33 |  88.88 | 30-31,34-35,49 
1330
+  UserProvider.tsx  |  95.45 |  87.5 |  100 |  95.45 | 42-43 
1331
+  test/integration  |  98.96 |  94.11 |  100 |  98.96 |  
1332
+  sdk.test.tsx  |  98.96 |  94.11 |  100 |  98.96 | 31-32 
1333
+  test/support  |  100 |  100 |  100 |  100 |  
1334
+  fixtures.ts  |  100 |  100 |  100 |  100 |  
1335
+  test/unit  |  100 |  100 |  100 |  100 |  
1336
+  logger.test.ts  |  100 |  100 |  100 |  100 |  
1337
+  utils.test.ts  |  100 |  100 |  100 |  100 |  
1338
+  test/unit/lib  |  100 |  100 |  100 |  100 |  
1339
+  oauth.test.ts  |  100 |  100 |  100 |  100 |  
1340
+  test/unit/nextjs  |  99.7 |  97.67 |  100 |  99.7 |  
1341
+  NextAuthProvider.test.tsx  |  100 |  100 |  100 |  100 |  
1342
+  config.test.ts  |  100 |  100 |  100 |  100 |  
1343
+  getUser.test.ts  |  97.29 |  87.5 |  100 |  97.29 | 31 
1344
+  middleware.test.ts  |  100 |  100 |  100 |  100 |  
1345
+  utils.test.ts  |  100 |  100 |  100 |  100 |  
1346
+  test/unit/publicApi  |  100 |  100 |  100 |  100 |  
1347
+  apiSnapshot.test.ts  |  100 |  100 |  100 |  100 |  
1348
+  test/unit/react/components  |  100 |  100 |  0 |  100 |  
1349
+  SignInButton.test.tsx  |  100 |  100 |  0 |  100 |  
1350
+  SignOutButton.test.tsx  |  100 |  100 |  0 |  100 |  
1351
+  test/unit/server  |  97.7 |  76.19 |  33.33 |  97.7 |  
1352
+  login.test.ts  |  97.12 |  68.75 |  33.33 |  97.12 | 23-24,27-28 
1353
+  session.test.ts  |  100 |  100 |  100 |  100 |  
1354
+  test/unit/services  |  100 |  100 |  100 |  100 |  
1355
+  AuthenticationService.test.ts  |  100 |  100 |  100 |  100 |  
1356
+  ...erAuthenticationResolver.test.ts |  100 |  100 |  100 |  100 |  
1357
+  test/unit/shared  |  100 |  100 |  100 |  100 |  
1358
+  ...cAuthenticationRefresher.test.ts |  100 |  100 |  100 |  100 |  
1359
+  UserSession.test.ts  |  100 |  100 |  100 |  100 |  
1360
+  storage.test.ts  |  100 |  100 |  100 |  100 |  
1361
+  test/unit/shared/components  |  100 |  100 |  100 |  100 |  
1362
+  CivicAuthIframeContainer.test.tsx  |  100 |  100 |  100 |  100 |  
1363
+ --------------------------------------|---------|----------|---------|---------|-------------------
1442
1364
  [?25h[?25h