@civic/auth 0.0.1-beta.28 → 0.0.1-beta.29

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 (261) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/.turbo/turbo-lint.log +14 -0
  3. package/.turbo/turbo-test.log +1678 -0
  4. package/civic-auth-0.0.1-beta.15.tgz +0 -0
  5. package/civic-auth-0.0.1-beta.17.tgz +0 -0
  6. package/dist/AuthProvider-BYZ8w92b.d.mts +15 -0
  7. package/dist/AuthProvider-BgOwv9h8.d.ts +15 -0
  8. package/dist/AuthProvider-Bj_Prt1x.d.ts +21 -0
  9. package/dist/AuthProvider-DUAoX4G9.d.mts +21 -0
  10. package/dist/UserProvider-BA2uflVB.d.ts +16 -0
  11. package/dist/UserProvider-Bl3j1PUO.d.mts +16 -0
  12. package/dist/UserProvider-CMLaYOUD.d.ts +16 -0
  13. package/dist/UserProvider-Cbm8MZkJ.d.mts +16 -0
  14. package/dist/chunk-4PLCDPEN.mjs +599 -0
  15. package/dist/chunk-4PLCDPEN.mjs.map +1 -0
  16. package/dist/chunk-5UQQYXCX.js +1 -0
  17. package/dist/chunk-5UQQYXCX.js.map +1 -0
  18. package/dist/chunk-63YGK3A7.mjs +223 -0
  19. package/dist/chunk-63YGK3A7.mjs.map +1 -0
  20. package/dist/chunk-6RFRDWIP.js +223 -0
  21. package/dist/chunk-6RFRDWIP.js.map +1 -0
  22. package/dist/chunk-7K3QN2AT.js +599 -0
  23. package/dist/chunk-7K3QN2AT.js.map +1 -0
  24. package/dist/chunk-AM2Y662I.js +601 -0
  25. package/dist/chunk-AM2Y662I.js.map +1 -0
  26. package/dist/chunk-AP4627CS.mjs +223 -0
  27. package/dist/chunk-AP4627CS.mjs.map +1 -0
  28. package/dist/chunk-CRTRMMJ7.js +59 -0
  29. package/dist/chunk-CRTRMMJ7.js.map +1 -0
  30. package/dist/chunk-CTVJJBBA.js +118 -0
  31. package/dist/chunk-CTVJJBBA.js.map +1 -0
  32. package/dist/chunk-EKLYHP2D.mjs +711 -0
  33. package/dist/chunk-EKLYHP2D.mjs.map +1 -0
  34. package/dist/chunk-FHRZSX3C.js +710 -0
  35. package/dist/chunk-FHRZSX3C.js.map +1 -0
  36. package/dist/chunk-GB3H3I47.js +711 -0
  37. package/dist/chunk-GB3H3I47.js.map +1 -0
  38. package/dist/chunk-JDZPCA3P.js +173 -0
  39. package/dist/chunk-JDZPCA3P.js.map +1 -0
  40. package/dist/chunk-JEOPLLWO.js +223 -0
  41. package/dist/chunk-JEOPLLWO.js.map +1 -0
  42. package/dist/chunk-MK7557NR.mjs +118 -0
  43. package/dist/chunk-MK7557NR.mjs.map +1 -0
  44. package/dist/chunk-NLRREFOX.mjs +710 -0
  45. package/dist/chunk-NLRREFOX.mjs.map +1 -0
  46. package/dist/chunk-O3WGNLRO.mjs +173 -0
  47. package/dist/chunk-O3WGNLRO.mjs.map +1 -0
  48. package/dist/chunk-OXXUQ36U.mjs +283 -0
  49. package/dist/chunk-OXXUQ36U.mjs.map +1 -0
  50. package/dist/chunk-PMJAV4JJ.mjs +1 -0
  51. package/dist/chunk-PMJAV4JJ.mjs.map +1 -0
  52. package/dist/chunk-Q7DSPTUG.mjs +601 -0
  53. package/dist/chunk-Q7DSPTUG.mjs.map +1 -0
  54. package/dist/chunk-RGHW4PYM.mjs +59 -0
  55. package/dist/chunk-RGHW4PYM.mjs.map +1 -0
  56. package/dist/chunk-TH6FI2XI.js +283 -0
  57. package/dist/chunk-TH6FI2XI.js.map +1 -0
  58. package/dist/cjs/src/browser/storage.d.ts +2 -2
  59. package/dist/cjs/src/browser/storage.d.ts.map +1 -1
  60. package/dist/cjs/src/browser/storage.js +3 -3
  61. package/dist/cjs/src/browser/storage.js.map +1 -1
  62. package/dist/cjs/src/nextjs/GetUser.d.ts +1 -1
  63. package/dist/cjs/src/nextjs/GetUser.d.ts.map +1 -1
  64. package/dist/cjs/src/nextjs/GetUser.js +3 -3
  65. package/dist/cjs/src/nextjs/GetUser.js.map +1 -1
  66. package/dist/cjs/src/nextjs/config.d.ts.map +1 -1
  67. package/dist/cjs/src/nextjs/config.js +0 -2
  68. package/dist/cjs/src/nextjs/config.js.map +1 -1
  69. package/dist/cjs/src/nextjs/cookies.d.ts +4 -4
  70. package/dist/cjs/src/nextjs/cookies.d.ts.map +1 -1
  71. package/dist/cjs/src/nextjs/cookies.js +14 -11
  72. package/dist/cjs/src/nextjs/cookies.js.map +1 -1
  73. package/dist/cjs/src/nextjs/routeHandler.d.ts.map +1 -1
  74. package/dist/cjs/src/nextjs/routeHandler.js +1 -5
  75. package/dist/cjs/src/nextjs/routeHandler.js.map +1 -1
  76. package/dist/cjs/src/reactjs/hooks/index.d.ts +0 -1
  77. package/dist/cjs/src/reactjs/hooks/index.d.ts.map +1 -1
  78. package/dist/cjs/src/reactjs/hooks/index.js +1 -3
  79. package/dist/cjs/src/reactjs/hooks/index.js.map +1 -1
  80. package/dist/cjs/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
  81. package/dist/cjs/src/server/ServerAuthenticationResolver.js +2 -7
  82. package/dist/cjs/src/server/ServerAuthenticationResolver.js.map +1 -1
  83. package/dist/cjs/src/server/login.d.ts +1 -1
  84. package/dist/cjs/src/server/login.d.ts.map +1 -1
  85. package/dist/cjs/src/server/login.js +2 -2
  86. package/dist/cjs/src/server/login.js.map +1 -1
  87. package/dist/cjs/src/services/AuthenticationService.d.ts.map +1 -1
  88. package/dist/cjs/src/services/AuthenticationService.js +6 -16
  89. package/dist/cjs/src/services/AuthenticationService.js.map +1 -1
  90. package/dist/cjs/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
  91. package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js +0 -2
  92. package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
  93. package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
  94. package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
  95. package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
  96. package/dist/cjs/src/shared/lib/UserSession.d.ts +4 -4
  97. package/dist/cjs/src/shared/lib/UserSession.d.ts.map +1 -1
  98. package/dist/cjs/src/shared/lib/UserSession.js +4 -4
  99. package/dist/cjs/src/shared/lib/UserSession.js.map +1 -1
  100. package/dist/cjs/src/shared/lib/session.js +1 -1
  101. package/dist/cjs/src/shared/lib/session.js.map +1 -1
  102. package/dist/cjs/src/shared/lib/storage.d.ts +2 -2
  103. package/dist/cjs/src/shared/lib/storage.d.ts.map +1 -1
  104. package/dist/cjs/src/shared/lib/storage.js.map +1 -1
  105. package/dist/cjs/src/shared/lib/util.d.ts +4 -4
  106. package/dist/cjs/src/shared/lib/util.d.ts.map +1 -1
  107. package/dist/cjs/src/shared/lib/util.js +16 -15
  108. package/dist/cjs/src/shared/lib/util.js.map +1 -1
  109. package/dist/cjs/src/types.d.ts +2 -2
  110. package/dist/cjs/src/types.d.ts.map +1 -1
  111. package/dist/cjs/src/types.js.map +1 -1
  112. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  113. package/dist/esm/src/browser/storage.d.ts +2 -2
  114. package/dist/esm/src/browser/storage.d.ts.map +1 -1
  115. package/dist/esm/src/browser/storage.js +3 -3
  116. package/dist/esm/src/browser/storage.js.map +1 -1
  117. package/dist/esm/src/nextjs/GetUser.d.ts +1 -1
  118. package/dist/esm/src/nextjs/GetUser.d.ts.map +1 -1
  119. package/dist/esm/src/nextjs/GetUser.js +3 -3
  120. package/dist/esm/src/nextjs/GetUser.js.map +1 -1
  121. package/dist/esm/src/nextjs/config.d.ts.map +1 -1
  122. package/dist/esm/src/nextjs/config.js +0 -2
  123. package/dist/esm/src/nextjs/config.js.map +1 -1
  124. package/dist/esm/src/nextjs/cookies.d.ts +4 -4
  125. package/dist/esm/src/nextjs/cookies.d.ts.map +1 -1
  126. package/dist/esm/src/nextjs/cookies.js +14 -11
  127. package/dist/esm/src/nextjs/cookies.js.map +1 -1
  128. package/dist/esm/src/nextjs/routeHandler.d.ts.map +1 -1
  129. package/dist/esm/src/nextjs/routeHandler.js +1 -5
  130. package/dist/esm/src/nextjs/routeHandler.js.map +1 -1
  131. package/dist/esm/src/reactjs/hooks/index.d.ts +0 -1
  132. package/dist/esm/src/reactjs/hooks/index.d.ts.map +1 -1
  133. package/dist/esm/src/reactjs/hooks/index.js +0 -1
  134. package/dist/esm/src/reactjs/hooks/index.js.map +1 -1
  135. package/dist/esm/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
  136. package/dist/esm/src/server/ServerAuthenticationResolver.js +2 -7
  137. package/dist/esm/src/server/ServerAuthenticationResolver.js.map +1 -1
  138. package/dist/esm/src/server/login.d.ts +1 -1
  139. package/dist/esm/src/server/login.d.ts.map +1 -1
  140. package/dist/esm/src/server/login.js +2 -2
  141. package/dist/esm/src/server/login.js.map +1 -1
  142. package/dist/esm/src/services/AuthenticationService.d.ts.map +1 -1
  143. package/dist/esm/src/services/AuthenticationService.js +6 -16
  144. package/dist/esm/src/services/AuthenticationService.js.map +1 -1
  145. package/dist/esm/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
  146. package/dist/esm/src/shared/components/CivicAuthIframeContainer.js +0 -2
  147. package/dist/esm/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
  148. package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
  149. package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
  150. package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
  151. package/dist/esm/src/shared/lib/UserSession.d.ts +4 -4
  152. package/dist/esm/src/shared/lib/UserSession.d.ts.map +1 -1
  153. package/dist/esm/src/shared/lib/UserSession.js +4 -4
  154. package/dist/esm/src/shared/lib/UserSession.js.map +1 -1
  155. package/dist/esm/src/shared/lib/session.js +1 -1
  156. package/dist/esm/src/shared/lib/session.js.map +1 -1
  157. package/dist/esm/src/shared/lib/storage.d.ts +2 -2
  158. package/dist/esm/src/shared/lib/storage.d.ts.map +1 -1
  159. package/dist/esm/src/shared/lib/storage.js.map +1 -1
  160. package/dist/esm/src/shared/lib/util.d.ts +4 -4
  161. package/dist/esm/src/shared/lib/util.d.ts.map +1 -1
  162. package/dist/esm/src/shared/lib/util.js +16 -15
  163. package/dist/esm/src/shared/lib/util.js.map +1 -1
  164. package/dist/esm/src/types.d.ts +2 -2
  165. package/dist/esm/src/types.d.ts.map +1 -1
  166. package/dist/esm/src/types.js.map +1 -1
  167. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  168. package/dist/index.css +340 -0
  169. package/dist/index.css.map +1 -0
  170. package/dist/index.d.mts +5 -0
  171. package/dist/index.d.ts +5 -0
  172. package/dist/index.js +3 -0
  173. package/dist/index.js.map +1 -0
  174. package/dist/index.mjs +3 -0
  175. package/dist/index.mjs.map +1 -0
  176. package/dist/nextjs/client.css +340 -0
  177. package/dist/nextjs/client.css.map +1 -0
  178. package/dist/nextjs/client.d.mts +10 -0
  179. package/dist/nextjs/client.d.ts +10 -0
  180. package/dist/nextjs/client.js +185 -0
  181. package/dist/nextjs/client.js.map +1 -0
  182. package/dist/nextjs/client.mjs +185 -0
  183. package/dist/nextjs/client.mjs.map +1 -0
  184. package/dist/nextjs.d.mts +267 -0
  185. package/dist/nextjs.d.ts +267 -0
  186. package/dist/nextjs.js +315 -0
  187. package/dist/nextjs.js.map +1 -0
  188. package/dist/nextjs.mjs +315 -0
  189. package/dist/nextjs.mjs.map +1 -0
  190. package/dist/react.d.mts +65 -0
  191. package/dist/react.d.ts +65 -0
  192. package/dist/react.js +226 -0
  193. package/dist/react.js.map +1 -0
  194. package/dist/react.mjs +226 -0
  195. package/dist/react.mjs.map +1 -0
  196. package/dist/server.d.mts +35 -0
  197. package/dist/server.d.ts +35 -0
  198. package/dist/server.js +20 -0
  199. package/dist/server.js.map +1 -0
  200. package/dist/server.mjs +20 -0
  201. package/dist/server.mjs.map +1 -0
  202. package/dist/src/shared/components/LoadingIcon.d.ts.map +1 -1
  203. package/dist/src/shared/components/LoadingIcon.js +0 -6
  204. package/dist/src/shared/components/LoadingIcon.js.map +1 -1
  205. package/dist/storage-ANmRwpZ3.d.ts +25 -0
  206. package/dist/storage-B2eAQNdv.d.ts +25 -0
  207. package/dist/storage-BJPUpxhm.d.mts +25 -0
  208. package/dist/storage-BJyqsZwC.d.mts +25 -0
  209. package/dist/tsconfig.tsbuildinfo +1 -1
  210. package/dist/types-Bqm9OCZN.d.mts +22 -0
  211. package/dist/types-Bqm9OCZN.d.ts +22 -0
  212. package/dist/types-BxAubCqO.d.mts +58 -0
  213. package/dist/types-BxAubCqO.d.ts +58 -0
  214. package/dist/types-DOfl9w7j.d.mts +23 -0
  215. package/dist/types-DOfl9w7j.d.ts +23 -0
  216. package/dist/types-HdCjGldB.d.mts +58 -0
  217. package/dist/types-HdCjGldB.d.ts +58 -0
  218. package/package.json +1 -1
  219. package/src/browser/storage.ts +3 -3
  220. package/src/nextjs/GetUser.ts +3 -3
  221. package/src/nextjs/config.ts +0 -2
  222. package/src/nextjs/cookies.ts +14 -18
  223. package/src/nextjs/routeHandler.ts +1 -5
  224. package/src/reactjs/hooks/index.ts +0 -1
  225. package/src/server/ServerAuthenticationResolver.ts +2 -7
  226. package/src/server/login.ts +2 -2
  227. package/src/services/AuthenticationService.ts +6 -16
  228. package/src/shared/components/CivicAuthIframeContainer.tsx +0 -4
  229. package/src/shared/lib/GenericAuthenticationRefresher.ts +3 -8
  230. package/src/shared/lib/UserSession.ts +6 -6
  231. package/src/shared/lib/session.ts +1 -1
  232. package/src/shared/lib/storage.ts +2 -2
  233. package/src/shared/lib/util.ts +21 -18
  234. package/src/types.ts +2 -2
  235. package/test/unit/nextjs/getUser.test.ts +8 -8
  236. package/test/unit/publicApi/__snapshots__/apiSnapshot.test.ts.snap +0 -7
  237. package/test/unit/server/login.test.ts +20 -18
  238. package/test/unit/server/session.test.ts +4 -4
  239. package/test/unit/services/AuthenticationService.test.ts +3 -3
  240. package/test/unit/services/ServerAuthenticationResolver.test.ts +11 -6
  241. package/test/unit/shared/GenericAuthenticationRefresher.test.ts +4 -4
  242. package/test/unit/shared/UserSession.test.ts +6 -6
  243. package/test/unit/shared/storage.test.ts +6 -6
  244. package/dist/cjs/src/nextjs/client/index.d.ts +0 -2
  245. package/dist/cjs/src/nextjs/client/index.d.ts.map +0 -1
  246. package/dist/cjs/src/nextjs/client/index.js +0 -6
  247. package/dist/cjs/src/nextjs/client/index.js.map +0 -1
  248. package/dist/cjs/src/styles.css +0 -387
  249. package/dist/esm/src/nextjs/client/index.d.ts +0 -2
  250. package/dist/esm/src/nextjs/client/index.d.ts.map +0 -1
  251. package/dist/esm/src/nextjs/client/index.js +0 -2
  252. package/dist/esm/src/nextjs/client/index.js.map +0 -1
  253. package/dist/esm/src/styles.css +0 -387
  254. package/dist/src/nextjs/client/index.d.ts +0 -2
  255. package/dist/src/nextjs/client/index.d.ts.map +0 -1
  256. package/dist/src/nextjs/client/index.js +0 -2
  257. package/dist/src/nextjs/client/index.js.map +0 -1
  258. package/dist/test/unit/nextjs/routeHandler.test.d.ts +0 -2
  259. package/dist/test/unit/nextjs/routeHandler.test.d.ts.map +0 -1
  260. package/dist/test/unit/nextjs/routeHandler.test.js +0 -271
  261. package/dist/test/unit/nextjs/routeHandler.test.js.map +0 -1
@@ -0,0 +1,1678 @@
1
+
2
+ 
3
+ > @civic/auth@0.0.1-beta.28 test /Users/patrick/Code/civic-auth/packages/civic-auth-client
4
+ > vitest "--run" "--coverage"
5
+
6
+
7
+  RUN  v2.1.2 /Users/patrick/Code/civic-auth/packages/civic-auth-client
8
+  Coverage enabled with v8
9
+
10
+ stdout | test/unit/nextjs/middleware.test.ts
11
+ process.env.NODE_ENV: development
12
+ defaultServerSecure: false
13
+
14
+ stdout | test/unit/nextjs/config.test.ts
15
+ process.env.NODE_ENV: development
16
+ defaultServerSecure: false
17
+
18
+ [?25l · test/unit/nextjs/config.test.ts (10)
19
+ · test/unit/nextjs/middleware.test.ts (7)
20
+ · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
21
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > authMiddleware > should allow access when token is present
22
+ matching { pattern: '/*', pathname: '/protected', match: true }
23
+ → Auth check passed
24
+
25
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > authMiddleware > should skip auth check for redirect to login page
26
+ → Skipping auth check - this is the login URL
27
+
28
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > authMiddleware > should not skip auth check for non-GET to login page
29
+ matching { pattern: '/*', pathname: '/login', match: true }
30
+ → No valid token found - redirecting to login URL {}
31
+
32
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > withAuth > should chain custom middleware when authenticated
33
+ matching { pattern: '/*', pathname: '/protected', match: true }
34
+ → Auth check passed
35
+
36
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > withAuth > should not chain custom middleware when unauthorized
37
+ matching { pattern: '/*', pathname: '/protected', match: true }
38
+ → No valid token found - redirecting to login URL {}
39
+
40
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > path matching > should respect include patterns
41
+ matching { pattern: '/protected/**', pathname: '/public', match: false }
42
+ → Skipping auth check - path not in include patterns
43
+
44
+ stdout | test/unit/nextjs/config.test.ts > nextjs/config > resolveAuthConfig > should set secure to true in the default cookie configs if NODE_ENV is not development
45
+ process.env.NODE_ENV: production
46
+ defaultServerSecure: true
47
+
48
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > path matching > should respect exclude patterns
49
+ matching {
50
+ pattern: '/protected/**',
51
+ pathname: '/protected/public',
52
+ match: true
53
+ }
54
+ matching {
55
+ pattern: '/protected/public',
56
+ pathname: '/protected/public',
57
+ match: true
58
+ }
59
+ → Skipping auth check - path in exclude patterns
60
+
61
+ [?25l · test/unit/nextjs/config.test.ts (10)
62
+ · test/unit/nextjs/middleware.test.ts (7)
63
+ · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
64
+ [?25l · test/unit/nextjs/config.test.ts (10)
65
+ · test/unit/logger.test.ts (11)
66
+ · test/unit/nextjs/middleware.test.ts (7)
67
+ · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
68
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
69
+ · test/unit/logger.test.ts (11)
70
+ · test/unit/nextjs/middleware.test.ts (7)
71
+ · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
72
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
73
+ · test/unit/logger.test.ts (11)
74
+ ✓ test/unit/nextjs/middleware.test.ts (7)
75
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
76
+ ❯ CivicAuthIframeContainer (3)
77
+ ⠙ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
78
+ · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
79
+ · does not call onClose if closeOnRedirect is false
80
+ stdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
81
+ handleIframeLoad
82
+ sameDomainCodeExchangeRequired, calling callback URL again...
83
+ handleIframeLoad
84
+ sameDomainCodeExchangeRequired, calling callback URL again...
85
+
86
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
87
+ ✓ test/unit/logger.test.ts (11)
88
+ ✓ test/unit/nextjs/middleware.test.ts (7)
89
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
90
+ ❯ CivicAuthIframeContainer (3)
91
+ ⠹ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
92
+ · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
93
+ · does not call onClose if closeOnRedirect is false
94
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
95
+ ✓ test/unit/logger.test.ts (11)
96
+ ✓ test/unit/nextjs/middleware.test.ts (7)
97
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
98
+ ❯ CivicAuthIframeContainer (3)
99
+ ⠸ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
100
+ · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
101
+ · does not call onClose if closeOnRedirect is false
102
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
103
+ ✓ test/unit/logger.test.ts (11)
104
+ ✓ test/unit/nextjs/middleware.test.ts (7)
105
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
106
+ ❯ CivicAuthIframeContainer (3)
107
+ ⠼ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
108
+ · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
109
+ · does not call onClose if closeOnRedirect is false
110
+ · test/unit/lib/oauth.test.ts (6)
111
+ stdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
112
+ handleIframeLoad
113
+ handleIframeLoad
114
+
115
+ stdout | test/unit/shared/components/CivicAuthIframeContainer.test.tsx > CivicAuthIframeContainer > does not call onClose if closeOnRedirect is false
116
+ handleIframeLoad
117
+ sameDomainCodeExchangeRequired, calling callback URL again...
118
+ handleIframeLoad
119
+ sameDomainCodeExchangeRequired, calling callback URL again...
120
+
121
+ stderr | test/unit/lib/oauth.test.ts > displayModeFromState > should return the display mode from the state
122
+ Failed to parse displayMode from state: state DOMException [InvalidCharacterError]: The string to be decoded is not correctly encoded.
123
+  at atob (node:buffer:1271:13)
124
+ at Module.displayModeFromState (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
125
+ at /Users/patrick/Code/civic-auth/packages/civic-auth-client/test/unit/lib/oauth.test.ts:42:20
126
+ at file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:146:14
127
+ at file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:533:11
128
+ at runWithTimeout (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:61:7)
129
+ at runTest (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:986:17)
130
+  at processTicksAndRejections (node:internal/process/task_queues:95:5)
131
+ at runSuite (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
132
+ at runSuite (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
133
+
134
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
135
+ ✓ test/unit/logger.test.ts (11)
136
+ · test/unit/services/AuthenticationService.test.ts (6)
137
+ ✓ test/unit/nextjs/middleware.test.ts (7)
138
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
139
+ ❯ CivicAuthIframeContainer (3)
140
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
141
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
142
+ ⠙ does not call onClose if closeOnRedirect is false
143
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
144
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
145
+ · test/unit/lib/oauth.test.ts (6)
146
+ stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > init > should initialize OAuth2 client with resolved endpoints
147
+ ServerAuthenticationResolver constructor {
148
+ authConfig: {
149
+ clientId: 'mockClientId',
150
+ oauthServer: 'http://mockOauthServer',
151
+ redirectUrl: 'http://localhost/redirect',
152
+ challengeUrl: 'http://localhost/challenge'
153
+ },
154
+ storage: {},
155
+ endpointOverrides: undefined
156
+ }
157
+
158
+ stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > tokenExchange > should exchange auth code for tokens and store them
159
+ ServerAuthenticationResolver constructor {
160
+ authConfig: {
161
+ clientId: 'mockClientId',
162
+ oauthServer: 'http://mockOauthServer',
163
+ redirectUrl: 'http://localhost/redirect',
164
+ challengeUrl: 'http://localhost/challenge'
165
+ },
166
+ storage: {},
167
+ endpointOverrides: undefined
168
+ }
169
+
170
+ stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > tokenExchange > should throw an error if code verifier is not found
171
+ ServerAuthenticationResolver constructor {
172
+ authConfig: {
173
+ clientId: 'mockClientId',
174
+ oauthServer: 'http://mockOauthServer',
175
+ redirectUrl: 'http://localhost/redirect',
176
+ challengeUrl: 'http://localhost/challenge'
177
+ },
178
+ storage: {},
179
+ endpointOverrides: undefined
180
+ }
181
+
182
+ stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > getSessionData > should retrieve session data from storage
183
+ ServerAuthenticationResolver constructor {
184
+ authConfig: {
185
+ clientId: 'mockClientId',
186
+ oauthServer: 'http://mockOauthServer',
187
+ redirectUrl: 'http://localhost/redirect',
188
+ challengeUrl: 'http://localhost/challenge'
189
+ },
190
+ storage: {},
191
+ endpointOverrides: undefined
192
+ }
193
+
194
+ stdout | test/unit/services/ServerAuthenticationResolver.test.ts > ServerAuthenticationResolver > getSessionData > should return null if no tokens are found in storage
195
+ ServerAuthenticationResolver constructor {
196
+ authConfig: {
197
+ clientId: 'mockClientId',
198
+ oauthServer: 'http://mockOauthServer',
199
+ redirectUrl: 'http://localhost/redirect',
200
+ challengeUrl: 'http://localhost/challenge'
201
+ },
202
+ storage: {},
203
+ endpointOverrides: undefined
204
+ }
205
+
206
+ stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > init > should initialize OAuth2 client with resolved endpoints
207
+ GenericAuthenticationRefresher constructor {
208
+ authConfig: {
209
+ clientId: 'mockClientId',
210
+ oauthServer: 'http://mockOauthServer',
211
+ redirectUrl: 'http://localhost/redirect'
212
+ },
213
+ endpointOverrides: undefined
214
+ }
215
+
216
+ stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > refreshTokens > should refresh tokens and store them
217
+ GenericAuthenticationRefresher constructor {
218
+ authConfig: {
219
+ clientId: 'mockClientId',
220
+ oauthServer: 'http://mockOauthServer',
221
+ redirectUrl: 'http://localhost/redirect'
222
+ },
223
+ endpointOverrides: undefined
224
+ }
225
+
226
+ stdout | test/unit/shared/GenericAuthenticationRefresher.test.ts > GenericAuthenticationRefresher > refreshTokens > should throw an error if no refresh token is available
227
+ GenericAuthenticationRefresher constructor {
228
+ authConfig: {
229
+ clientId: 'mockClientId',
230
+ oauthServer: 'http://mockOauthServer',
231
+ redirectUrl: 'http://localhost/redirect'
232
+ },
233
+ endpointOverrides: undefined
234
+ }
235
+
236
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
237
+ · test/unit/server/login.test.ts (6)
238
+ ✓ test/unit/logger.test.ts (11)
239
+ · test/unit/services/AuthenticationService.test.ts (6)
240
+ ✓ test/unit/nextjs/middleware.test.ts (7)
241
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
242
+ ❯ CivicAuthIframeContainer (3)
243
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
244
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
245
+ ⠹ does not call onClose if closeOnRedirect is false
246
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
247
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
248
+ · test/unit/lib/oauth.test.ts (6)
249
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
250
+ BrowserAuthenticationInitiator constructor {
251
+ clientId: 'mockClientId',
252
+ redirectUrl: 'http://localhost/redirect',
253
+ state: 'mockState',
254
+ scopes: [ 'openid', 'profile' ],
255
+ displayMode: 'redirect',
256
+ oauthServer: 'http://mockOauthServer',
257
+ pkceConsumer: {}
258
+ }
259
+
260
+ stderr | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
261
+ Error: Not implemented: navigation (except hash changes)
262
+ at module.exports (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
263
+ at navigateFetch (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:77:3)
264
+ at exports.navigate (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:55:3)
265
+ at LocationImpl._locationObjectNavigate (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:31:5)
266
+ at LocationImpl._locationObjectSetterNavigate (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:25:17)
267
+ at LocationImpl.set href [as href] (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:47:10)
268
+ at Location.set href [as href] (/Users/patrick/Code/civic-auth/node_modules/jsdom/lib/jsdom/living/generated/Location.js:125:37)
269
+ at BrowserAuthenticationInitiator.signIn (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:115:23)
270
+ at processTicksAndRejections (node:internal/process/task_queues:95:5)
271
+ at /Users/patrick/Code/civic-auth/packages/civic-auth-client/test/unit/services/AuthenticationService.test.ts:54:19 undefined
272
+
273
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a logout URL
274
+ BrowserAuthenticationInitiator constructor {
275
+ clientId: 'mockClientId',
276
+ redirectUrl: 'http://localhost/redirect',
277
+ state: 'mockState',
278
+ scopes: [ 'openid', 'profile' ],
279
+ displayMode: 'redirect',
280
+ oauthServer: 'http://mockOauthServer',
281
+ pkceConsumer: {}
282
+ }
283
+
284
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > GenericAuthenticationInitiator > should generate a login URL
285
+ GenericAuthenticationInitiator constructor {
286
+ config: {
287
+ clientId: 'mockClientId',
288
+ redirectUrl: 'http://localhost/redirect',
289
+ state: 'mockState',
290
+ scopes: [ 'openid', 'profile' ],
291
+ displayMode: 'redirect',
292
+ oauthServer: 'http://mockOauthServer',
293
+ pkceConsumer: {}
294
+ }
295
+ }
296
+
297
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > GenericAuthenticationInitiator > should generate a logout URL
298
+ GenericAuthenticationInitiator constructor {
299
+ config: {
300
+ clientId: 'mockClientId',
301
+ redirectUrl: 'http://localhost/redirect',
302
+ state: 'mockState',
303
+ scopes: [ 'openid', 'profile' ],
304
+ displayMode: 'redirect',
305
+ oauthServer: 'http://mockOauthServer',
306
+ pkceConsumer: {}
307
+ }
308
+ }
309
+
310
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationService > should exchange auth code for tokens and store them
311
+ BrowserAuthenticationService constructor {
312
+ config: {
313
+ clientId: 'mockClientId',
314
+ redirectUrl: 'http://localhost/redirect',
315
+ state: 'mockState',
316
+ scopes: [ 'openid', 'profile' ],
317
+ displayMode: 'redirect',
318
+ oauthServer: 'http://mockOauthServer'
319
+ }
320
+ }
321
+ BrowserAuthenticationInitiator constructor {
322
+ clientId: 'mockClientId',
323
+ redirectUrl: 'http://localhost/redirect',
324
+ state: 'eyJ1dWlkIjoiYWI5ZGM5MmItYTZlNC00MTYzLTgyZTgtYjFkMWIwNTVhNWE0IiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
325
+ scopes: [ 'openid', 'profile' ],
326
+ displayMode: 'redirect',
327
+ oauthServer: 'http://mockOauthServer',
328
+ pkceConsumer: BrowserPublicClientPKCEProducer {
329
+ constructor: [Function: BrowserPublicClientPKCEProducer] {
330
+ getMockName: [Function (anonymous)],
331
+ mockName: [Function (anonymous)],
332
+ mockClear: [Function (anonymous)],
333
+ mockReset: [Function (anonymous)],
334
+ mockRestore: [Function (anonymous)],
335
+ getMockImplementation: [Function (anonymous)],
336
+ mockImplementation: [Function (anonymous)],
337
+ mockImplementationOnce: [Function (anonymous)],
338
+ withImplementation: [Function: withImplementation],
339
+ mockReturnThis: [Function (anonymous)],
340
+ mockReturnValue: [Function (anonymous)],
341
+ mockReturnValueOnce: [Function (anonymous)],
342
+ mockResolvedValue: [Function (anonymous)],
343
+ mockResolvedValueOnce: [Function (anonymous)],
344
+ mockRejectedValue: [Function (anonymous)],
345
+ mockRejectedValueOnce: [Function (anonymous)]
346
+ },
347
+ getCodeChallenge: [Function: getCodeChallenge] {
348
+ getMockName: [Function (anonymous)],
349
+ mockName: [Function (anonymous)],
350
+ mockClear: [Function (anonymous)],
351
+ mockReset: [Function (anonymous)],
352
+ mockRestore: [Function (anonymous)],
353
+ getMockImplementation: [Function (anonymous)],
354
+ mockImplementation: [Function (anonymous)],
355
+ mockImplementationOnce: [Function (anonymous)],
356
+ withImplementation: [Function: withImplementation],
357
+ mockReturnThis: [Function (anonymous)],
358
+ mockReturnValue: [Function (anonymous)],
359
+ mockReturnValueOnce: [Function (anonymous)],
360
+ mockResolvedValue: [Function (anonymous)],
361
+ mockResolvedValueOnce: [Function (anonymous)],
362
+ mockRejectedValue: [Function (anonymous)],
363
+ mockRejectedValueOnce: [Function (anonymous)]
364
+ },
365
+ getCodeVerifier: [Function: getCodeVerifier] {
366
+ getMockName: [Function (anonymous)],
367
+ mockName: [Function (anonymous)],
368
+ mockClear: [Function (anonymous)],
369
+ mockReset: [Function (anonymous)],
370
+ mockRestore: [Function (anonymous)],
371
+ getMockImplementation: [Function (anonymous)],
372
+ mockImplementation: [Function (anonymous)],
373
+ mockImplementationOnce: [Function (anonymous)],
374
+ withImplementation: [Function: withImplementation],
375
+ mockReturnThis: [Function (anonymous)],
376
+ mockReturnValue: [Function (anonymous)],
377
+ mockReturnValueOnce: [Function (anonymous)],
378
+ mockResolvedValue: [Function (anonymous)],
379
+ mockResolvedValueOnce: [Function (anonymous)],
380
+ mockRejectedValue: [Function (anonymous)],
381
+ mockRejectedValueOnce: [Function (anonymous)]
382
+ }
383
+ }
384
+ }
385
+
386
+ stderr | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationService > should exchange auth code for tokens and store them
387
+ Failed to parse displayMode from state: mockState DOMException [InvalidCharacterError]: The string to be decoded is not correctly encoded.
388
+  at atob (node:buffer:1271:13)
389
+ at Module.displayModeFromState (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
390
+ at BrowserAuthenticationService.tokenExchange (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:266:31)
391
+  at processTicksAndRejections (node:internal/process/task_queues:95:5)
392
+ at /Users/patrick/Code/civic-auth/packages/civic-auth-client/test/unit/services/AuthenticationService.test.ts:128:22
393
+ at file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:533:5
394
+ at runTest (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:986:11)
395
+ at runSuite (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
396
+ at runSuite (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
397
+ at runSuite (file:///Users/patrick/Code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
398
+
399
+ stdout | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationService > should retrieve session data from local storage
400
+ BrowserAuthenticationService constructor {
401
+ config: {
402
+ clientId: 'mockClientId',
403
+ redirectUrl: 'http://localhost/redirect',
404
+ state: 'mockState',
405
+ scopes: [ 'openid', 'profile' ],
406
+ displayMode: 'redirect',
407
+ oauthServer: 'http://mockOauthServer'
408
+ }
409
+ }
410
+ BrowserAuthenticationInitiator constructor {
411
+ clientId: 'mockClientId',
412
+ redirectUrl: 'http://localhost/redirect',
413
+ state: 'eyJ1dWlkIjoiZTg4MjA2MGMtYTJhZi00YTAyLWE4MDctMDQ2YWI1Y2QxMGNlIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
414
+ scopes: [ 'openid', 'profile' ],
415
+ displayMode: 'redirect',
416
+ oauthServer: 'http://mockOauthServer',
417
+ pkceConsumer: BrowserPublicClientPKCEProducer {
418
+ constructor: [Function: BrowserPublicClientPKCEProducer] {
419
+ getMockName: [Function (anonymous)],
420
+ mockName: [Function (anonymous)],
421
+ mockClear: [Function (anonymous)],
422
+ mockReset: [Function (anonymous)],
423
+ mockRestore: [Function (anonymous)],
424
+ getMockImplementation: [Function (anonymous)],
425
+ mockImplementation: [Function (anonymous)],
426
+ mockImplementationOnce: [Function (anonymous)],
427
+ withImplementation: [Function: withImplementation],
428
+ mockReturnThis: [Function (anonymous)],
429
+ mockReturnValue: [Function (anonymous)],
430
+ mockReturnValueOnce: [Function (anonymous)],
431
+ mockResolvedValue: [Function (anonymous)],
432
+ mockResolvedValueOnce: [Function (anonymous)],
433
+ mockRejectedValue: [Function (anonymous)],
434
+ mockRejectedValueOnce: [Function (anonymous)]
435
+ },
436
+ getCodeChallenge: [Function: getCodeChallenge] {
437
+ getMockName: [Function (anonymous)],
438
+ mockName: [Function (anonymous)],
439
+ mockClear: [Function (anonymous)],
440
+ mockReset: [Function (anonymous)],
441
+ mockRestore: [Function (anonymous)],
442
+ getMockImplementation: [Function (anonymous)],
443
+ mockImplementation: [Function (anonymous)],
444
+ mockImplementationOnce: [Function (anonymous)],
445
+ withImplementation: [Function: withImplementation],
446
+ mockReturnThis: [Function (anonymous)],
447
+ mockReturnValue: [Function (anonymous)],
448
+ mockReturnValueOnce: [Function (anonymous)],
449
+ mockResolvedValue: [Function (anonymous)],
450
+ mockResolvedValueOnce: [Function (anonymous)],
451
+ mockRejectedValue: [Function (anonymous)],
452
+ mockRejectedValueOnce: [Function (anonymous)]
453
+ },
454
+ getCodeVerifier: [Function: getCodeVerifier] {
455
+ getMockName: [Function (anonymous)],
456
+ mockName: [Function (anonymous)],
457
+ mockClear: [Function (anonymous)],
458
+ mockReset: [Function (anonymous)],
459
+ mockRestore: [Function (anonymous)],
460
+ getMockImplementation: [Function (anonymous)],
461
+ mockImplementation: [Function (anonymous)],
462
+ mockImplementationOnce: [Function (anonymous)],
463
+ withImplementation: [Function: withImplementation],
464
+ mockReturnThis: [Function (anonymous)],
465
+ mockReturnValue: [Function (anonymous)],
466
+ mockReturnValueOnce: [Function (anonymous)],
467
+ mockResolvedValue: [Function (anonymous)],
468
+ mockResolvedValueOnce: [Function (anonymous)],
469
+ mockRejectedValue: [Function (anonymous)],
470
+ mockRejectedValueOnce: [Function (anonymous)]
471
+ }
472
+ }
473
+ }
474
+
475
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
476
+ · test/unit/server/login.test.ts (6)
477
+ ✓ test/unit/logger.test.ts (11)
478
+ · test/unit/services/AuthenticationService.test.ts (6)
479
+ ✓ test/unit/nextjs/middleware.test.ts (7)
480
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
481
+ ❯ CivicAuthIframeContainer (3)
482
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
483
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
484
+ ⠸ does not call onClose if closeOnRedirect is false
485
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
486
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
487
+ · test/unit/lib/oauth.test.ts (6)
488
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
489
+ · test/unit/server/login.test.ts (6)
490
+ ✓ test/unit/logger.test.ts (11)
491
+ · test/unit/services/AuthenticationService.test.ts (6)
492
+ ✓ test/unit/nextjs/middleware.test.ts (7)
493
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
494
+ ❯ CivicAuthIframeContainer (3)
495
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
496
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
497
+ ⠼ does not call onClose if closeOnRedirect is false
498
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
499
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
500
+ · test/unit/lib/oauth.test.ts (6)
501
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
502
+ · test/unit/server/login.test.ts (6)
503
+ ✓ test/unit/logger.test.ts (11)
504
+ · test/unit/services/AuthenticationService.test.ts (6)
505
+ ✓ test/unit/nextjs/middleware.test.ts (7)
506
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
507
+ ❯ CivicAuthIframeContainer (3)
508
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
509
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
510
+ ⠴ does not call onClose if closeOnRedirect is false
511
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
512
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
513
+ ✓ test/unit/lib/oauth.test.ts (6)
514
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
515
+ · test/unit/server/login.test.ts (6)
516
+ ✓ test/unit/logger.test.ts (11)
517
+ · test/unit/services/AuthenticationService.test.ts (6)
518
+ ✓ test/unit/nextjs/middleware.test.ts (7)
519
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
520
+ ❯ CivicAuthIframeContainer (3)
521
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
522
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
523
+ ⠦ does not call onClose if closeOnRedirect is false
524
+ · test/unit/services/ServerAuthenticationResolver.test.ts (5)
525
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
526
+ ✓ test/unit/lib/oauth.test.ts (6)
527
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
528
+ · test/unit/server/login.test.ts (6)
529
+ ✓ test/unit/logger.test.ts (11)
530
+ · test/unit/services/AuthenticationService.test.ts (6)
531
+ ✓ test/unit/nextjs/middleware.test.ts (7)
532
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
533
+ ❯ CivicAuthIframeContainer (3)
534
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
535
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
536
+ ⠧ does not call onClose if closeOnRedirect is false
537
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
538
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
539
+ ✓ test/unit/lib/oauth.test.ts (6)
540
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
541
+ · test/unit/server/login.test.ts (6)
542
+ ✓ test/unit/logger.test.ts (11)
543
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
544
+ ✓ test/unit/nextjs/middleware.test.ts (7)
545
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
546
+ ❯ CivicAuthIframeContainer (3)
547
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
548
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
549
+ ⠇ does not call onClose if closeOnRedirect is false
550
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
551
+ · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
552
+ ✓ test/unit/lib/oauth.test.ts (6)
553
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
554
+ ✓ test/unit/server/login.test.ts (6)
555
+ ✓ test/unit/logger.test.ts (11)
556
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
557
+ ✓ test/unit/nextjs/middleware.test.ts (7)
558
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
559
+ ❯ CivicAuthIframeContainer (3)
560
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
561
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
562
+ ⠏ does not call onClose if closeOnRedirect is false
563
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
564
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
565
+ ✓ test/unit/lib/oauth.test.ts (6)
566
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
567
+ ✓ test/unit/server/login.test.ts (6)
568
+ ✓ test/unit/logger.test.ts (11)
569
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
570
+ ✓ test/unit/nextjs/middleware.test.ts (7)
571
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
572
+ ❯ CivicAuthIframeContainer (3)
573
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
574
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
575
+ ⠋ does not call onClose if closeOnRedirect is false
576
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
577
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
578
+ ✓ test/unit/lib/oauth.test.ts (6)
579
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
580
+ ✓ test/unit/server/login.test.ts (6)
581
+ ✓ test/unit/logger.test.ts (11)
582
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
583
+ ✓ test/unit/nextjs/middleware.test.ts (7)
584
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
585
+ ❯ CivicAuthIframeContainer (3)
586
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
587
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
588
+ ⠙ does not call onClose if closeOnRedirect is false
589
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
590
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
591
+ ✓ test/unit/lib/oauth.test.ts (6)
592
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
593
+ ✓ test/unit/server/login.test.ts (6)
594
+ ✓ test/unit/logger.test.ts (11)
595
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
596
+ ✓ test/unit/nextjs/middleware.test.ts (7)
597
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
598
+ ❯ CivicAuthIframeContainer (3)
599
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
600
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
601
+ ⠹ does not call onClose if closeOnRedirect is false
602
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
603
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
604
+ ✓ test/unit/lib/oauth.test.ts (6)
605
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
606
+ ✓ test/unit/server/login.test.ts (6)
607
+ ✓ test/unit/logger.test.ts (11)
608
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
609
+ ✓ test/unit/nextjs/middleware.test.ts (7)
610
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
611
+ ❯ CivicAuthIframeContainer (3)
612
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
613
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
614
+ ⠸ does not call onClose if closeOnRedirect is false
615
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
616
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
617
+ ✓ test/unit/lib/oauth.test.ts (6)
618
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
619
+ ✓ test/unit/server/login.test.ts (6)
620
+ ✓ test/unit/logger.test.ts (11)
621
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
622
+ ✓ test/unit/nextjs/middleware.test.ts (7)
623
+ ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
624
+ ❯ CivicAuthIframeContainer (3)
625
+ ✓ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
626
+ ✓ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
627
+ ⠼ does not call onClose if closeOnRedirect is false
628
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
629
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
630
+ ✓ test/unit/lib/oauth.test.ts (6)
631
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
632
+ ✓ test/unit/server/login.test.ts (6)
633
+ ✓ test/unit/logger.test.ts (11)
634
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
635
+ ✓ test/unit/nextjs/middleware.test.ts (7)
636
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
637
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
638
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
639
+ ✓ test/unit/lib/oauth.test.ts (6)
640
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l · test/integration/sdk.test.tsx (2)
641
+ ✓ test/unit/nextjs/config.test.ts (10)
642
+ ✓ test/unit/server/login.test.ts (6)
643
+ ✓ test/unit/logger.test.ts (11)
644
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
645
+ ✓ test/unit/nextjs/middleware.test.ts (7)
646
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
647
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
648
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
649
+ ✓ test/unit/lib/oauth.test.ts (6)
650
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ❯ test/integration/sdk.test.tsx (2)
651
+ ❯ OAuth login (2)
652
+ ⠙ should set the correct auth url for login with redirect
653
+ · should initiate code exchange, validate tokens, and derive user from ID token
654
+ ✓ test/unit/nextjs/config.test.ts (10)
655
+ ✓ test/unit/server/login.test.ts (6)
656
+ ✓ test/unit/logger.test.ts (11)
657
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
658
+ ✓ test/unit/nextjs/middleware.test.ts (7)
659
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
660
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
661
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
662
+ ✓ test/unit/lib/oauth.test.ts (6)
663
+ stdout | test/integration/sdk.test.tsx > OAuth login > should set the correct auth url for login with redirect
664
+ BrowserAuthenticationService constructor {
665
+ config: {
666
+ clientId: 'test-client-id',
667
+ redirectUrl: 'http://localhost:3001/callback',
668
+ oauthServer: 'http://localhost:3001',
669
+ scopes: [
670
+ 'openid',
671
+ 'profile',
672
+ 'email',
673
+ 'forwardedTokens',
674
+ 'offline_access'
675
+ ],
676
+ displayMode: 'iframe'
677
+ }
678
+ }
679
+ BrowserAuthenticationInitiator constructor {
680
+ clientId: 'test-client-id',
681
+ redirectUrl: 'http://localhost:3001/callback',
682
+ oauthServer: 'http://localhost:3001',
683
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
684
+ displayMode: 'iframe',
685
+ state: 'eyJ1dWlkIjoiMzQyYzAzMDItNTZkZS00YjBhLTg3ZGEtMTVhMjE5Mzc0NmU4IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
686
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
687
+ }
688
+ BrowserAuthenticationInitiator constructor {
689
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} },
690
+ clientId: 'test-client-id',
691
+ redirectUrl: 'http://localhost:3001/callback',
692
+ state: 'eyJ1dWlkIjoiZjQ0NTU5ZDUtMDVjYS00YTI1LWFmYTMtZTc0NzMzNDcxMTFiIiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
693
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
694
+ displayMode: 'redirect',
695
+ oauthServer: 'http://localhost:3001',
696
+ endpointOverrides: undefined,
697
+ nonce: undefined
698
+ }
699
+ BrowserAuthenticationService constructor {
700
+ config: {
701
+ clientId: 'test-client-id',
702
+ redirectUrl: 'http://localhost:3001/callback',
703
+ oauthServer: 'http://localhost:3001',
704
+ scopes: [
705
+ 'openid',
706
+ 'profile',
707
+ 'email',
708
+ 'forwardedTokens',
709
+ 'offline_access'
710
+ ],
711
+ displayMode: 'redirect'
712
+ }
713
+ }
714
+ BrowserAuthenticationInitiator constructor {
715
+ clientId: 'test-client-id',
716
+ redirectUrl: 'http://localhost:3001/callback',
717
+ oauthServer: 'http://localhost:3001',
718
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
719
+ displayMode: 'redirect',
720
+ state: 'eyJ1dWlkIjoiNTlmZWU5MWEtNGY1OC00ODEzLWE4NWUtZDAwMjQ3M2E0MDM1IiwiZGlzcGxheU1vZGUiOiJyZWRpcmVjdCJ9',
721
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
722
+ }
723
+ handleIframeLoad
724
+
725
+ stdout | test/integration/sdk.test.tsx > OAuth login > should set the correct auth url for login with redirect
726
+ 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
727
+
728
+ [?25l ❯ test/integration/sdk.test.tsx (2)
729
+ ❯ OAuth login (2)
730
+ ⠹ should set the correct auth url for login with redirect
731
+ · should initiate code exchange, validate tokens, and derive user from ID token
732
+ ✓ test/unit/nextjs/config.test.ts (10)
733
+ ✓ test/unit/server/login.test.ts (6)
734
+ ✓ test/unit/logger.test.ts (11)
735
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
736
+ ✓ test/unit/nextjs/middleware.test.ts (7)
737
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
738
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
739
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
740
+ ✓ test/unit/lib/oauth.test.ts (6)
741
+ [?25l ❯ test/integration/sdk.test.tsx (2)
742
+ ❯ OAuth login (2)
743
+ ⠸ should set the correct auth url for login with redirect
744
+ · should initiate code exchange, validate tokens, and derive user from ID token
745
+ ✓ test/unit/nextjs/config.test.ts (10)
746
+ ✓ test/unit/server/login.test.ts (6)
747
+ ✓ test/unit/logger.test.ts (11)
748
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
749
+ ✓ test/unit/nextjs/middleware.test.ts (7)
750
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
751
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
752
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
753
+ ✓ test/unit/lib/oauth.test.ts (6)
754
+ [?25l ❯ test/integration/sdk.test.tsx (2)
755
+ ❯ OAuth login (2)
756
+ ⠼ should set the correct auth url for login with redirect
757
+ · should initiate code exchange, validate tokens, and derive user from ID token
758
+ ✓ test/unit/nextjs/config.test.ts (10)
759
+ ✓ test/unit/server/login.test.ts (6)
760
+ ✓ test/unit/logger.test.ts (11)
761
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
762
+ ✓ test/unit/nextjs/middleware.test.ts (7)
763
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
764
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
765
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
766
+ ✓ test/unit/lib/oauth.test.ts (6)
767
+ [?25l ❯ test/integration/sdk.test.tsx (2)
768
+ ❯ OAuth login (2)
769
+ ⠴ should set the correct auth url for login with redirect
770
+ · should initiate code exchange, validate tokens, and derive user from ID token
771
+ ✓ test/unit/nextjs/config.test.ts (10)
772
+ ✓ test/unit/server/login.test.ts (6)
773
+ ✓ test/unit/logger.test.ts (11)
774
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
775
+ ✓ test/unit/nextjs/middleware.test.ts (7)
776
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
777
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
778
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
779
+ ✓ test/unit/lib/oauth.test.ts (6)
780
+ [?25l ❯ test/integration/sdk.test.tsx (2)
781
+ ❯ OAuth login (2)
782
+ ✓ should set the correct auth url for login with redirect 341ms
783
+ ⠙ should initiate code exchange, validate tokens, and derive user from ID token
784
+ ✓ test/unit/nextjs/config.test.ts (10)
785
+ ✓ test/unit/server/login.test.ts (6)
786
+ ✓ test/unit/logger.test.ts (11)
787
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
788
+ ✓ test/unit/nextjs/middleware.test.ts (7)
789
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
790
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
791
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
792
+ ✓ test/unit/lib/oauth.test.ts (6)
793
+ stdout | test/integration/sdk.test.tsx > OAuth login > should initiate code exchange, validate tokens, and derive user from ID token
794
+ BrowserAuthenticationService constructor {
795
+ config: {
796
+ clientId: 'test-client-id',
797
+ redirectUrl: 'http://localhost:3001/callback',
798
+ oauthServer: 'http://localhost:3001',
799
+ scopes: [
800
+ 'openid',
801
+ 'profile',
802
+ 'email',
803
+ 'forwardedTokens',
804
+ 'offline_access'
805
+ ],
806
+ displayMode: 'iframe'
807
+ }
808
+ }
809
+ BrowserAuthenticationInitiator constructor {
810
+ clientId: 'test-client-id',
811
+ redirectUrl: 'http://localhost:3001/callback',
812
+ oauthServer: 'http://localhost:3001',
813
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
814
+ displayMode: 'iframe',
815
+ state: 'eyJ1dWlkIjoiNTdmMGI3NWUtZTgxZi00YTkwLWIxYWYtNDFhYzY0ZjdjNjZjIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
816
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
817
+ }
818
+ handleIframeLoad
819
+
820
+ stderr | test/integration/sdk.test.tsx > OAuth login > should initiate code exchange, validate tokens, and derive user from ID token
821
+ Failed to parse displayMode from state: mock-state DOMException [InvalidCharacterError]: Invalid character
822
+  at atob (node:buffer:1269:13)
823
+ at Module.displayModeFromState (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
824
+ at BrowserAuthenticationService.tokenExchange (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:266:31)
825
+ at queryFn (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:185:11)
826
+ window.history.replaceState failed DOMException {}
827
+
828
+ [?25l ❯ test/integration/sdk.test.tsx (2)
829
+ ❯ OAuth login (2)
830
+ ✓ should set the correct auth url for login with redirect 341ms
831
+ ⠹ should initiate code exchange, validate tokens, and derive user from ID token
832
+ ✓ test/unit/nextjs/config.test.ts (10)
833
+ ✓ test/unit/server/login.test.ts (6)
834
+ ✓ test/unit/logger.test.ts (11)
835
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
836
+ ✓ test/unit/nextjs/middleware.test.ts (7)
837
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
838
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
839
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
840
+ ✓ test/unit/lib/oauth.test.ts (6)
841
+ [?25l ❯ test/integration/sdk.test.tsx (2)
842
+ ❯ OAuth login (2)
843
+ ✓ should set the correct auth url for login with redirect 341ms
844
+ ⠸ should initiate code exchange, validate tokens, and derive user from ID token
845
+ ✓ test/unit/nextjs/config.test.ts (10)
846
+ ✓ test/unit/server/login.test.ts (6)
847
+ ✓ test/unit/logger.test.ts (11)
848
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
849
+ ✓ test/unit/nextjs/middleware.test.ts (7)
850
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
851
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
852
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
853
+ ✓ test/unit/lib/oauth.test.ts (6)
854
+ [?25l ❯ test/integration/sdk.test.tsx (2)
855
+ ❯ OAuth login (2)
856
+ ✓ should set the correct auth url for login with redirect 341ms
857
+ ⠼ should initiate code exchange, validate tokens, and derive user from ID token
858
+ ✓ test/unit/nextjs/config.test.ts (10)
859
+ ✓ test/unit/server/login.test.ts (6)
860
+ ✓ test/unit/logger.test.ts (11)
861
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
862
+ ✓ test/unit/nextjs/middleware.test.ts (7)
863
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
864
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
865
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
866
+ ✓ test/unit/lib/oauth.test.ts (6)
867
+ [?25l ❯ test/integration/sdk.test.tsx (2)
868
+ ❯ OAuth login (2)
869
+ ✓ should set the correct auth url for login with redirect 341ms
870
+ ⠴ should initiate code exchange, validate tokens, and derive user from ID token
871
+ ✓ test/unit/nextjs/config.test.ts (10)
872
+ ✓ test/unit/server/login.test.ts (6)
873
+ ✓ test/unit/logger.test.ts (11)
874
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
875
+ ✓ test/unit/nextjs/middleware.test.ts (7)
876
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
877
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
878
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
879
+ ✓ test/unit/lib/oauth.test.ts (6)
880
+ [?25l ❯ test/integration/sdk.test.tsx (2)
881
+ ❯ OAuth login (2)
882
+ ✓ should set the correct auth url for login with redirect 341ms
883
+ ⠦ should initiate code exchange, validate tokens, and derive user from ID token
884
+ ✓ test/unit/nextjs/config.test.ts (10)
885
+ ✓ test/unit/server/login.test.ts (6)
886
+ ✓ test/unit/logger.test.ts (11)
887
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
888
+ ✓ test/unit/nextjs/middleware.test.ts (7)
889
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
890
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
891
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
892
+ ✓ test/unit/lib/oauth.test.ts (6)
893
+ [?25l ❯ test/integration/sdk.test.tsx (2)
894
+ ❯ OAuth login (2)
895
+ ✓ should set the correct auth url for login with redirect 341ms
896
+ ⠧ should initiate code exchange, validate tokens, and derive user from ID token
897
+ ✓ test/unit/nextjs/config.test.ts (10)
898
+ ✓ test/unit/server/login.test.ts (6)
899
+ ✓ test/unit/logger.test.ts (11)
900
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
901
+ ✓ test/unit/nextjs/middleware.test.ts (7)
902
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
903
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
904
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
905
+ ✓ test/unit/lib/oauth.test.ts (6)
906
+ [?25l ❯ test/integration/sdk.test.tsx (2)
907
+ ❯ OAuth login (2)
908
+ ✓ should set the correct auth url for login with redirect 341ms
909
+ ⠇ should initiate code exchange, validate tokens, and derive user from ID token
910
+ ✓ test/unit/nextjs/config.test.ts (10)
911
+ ✓ test/unit/server/login.test.ts (6)
912
+ ✓ test/unit/logger.test.ts (11)
913
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
914
+ ✓ test/unit/nextjs/middleware.test.ts (7)
915
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
916
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
917
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
918
+ ✓ test/unit/lib/oauth.test.ts (6)
919
+ [?25l ❯ test/integration/sdk.test.tsx (2)
920
+ ❯ OAuth login (2)
921
+ ✓ should set the correct auth url for login with redirect 341ms
922
+ ⠏ should initiate code exchange, validate tokens, and derive user from ID token
923
+ ✓ test/unit/nextjs/config.test.ts (10)
924
+ ✓ test/unit/server/login.test.ts (6)
925
+ ✓ test/unit/logger.test.ts (11)
926
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
927
+ ✓ test/unit/nextjs/middleware.test.ts (7)
928
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
929
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
930
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
931
+ ✓ test/unit/lib/oauth.test.ts (6)
932
+ [?25l ❯ test/integration/sdk.test.tsx (2)
933
+ ❯ OAuth login (2)
934
+ ✓ should set the correct auth url for login with redirect 341ms
935
+ ⠋ should initiate code exchange, validate tokens, and derive user from ID token
936
+ ✓ test/unit/nextjs/config.test.ts (10)
937
+ ✓ test/unit/server/login.test.ts (6)
938
+ ✓ test/unit/logger.test.ts (11)
939
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
940
+ ✓ test/unit/nextjs/middleware.test.ts (7)
941
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
942
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
943
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
944
+ ✓ test/unit/lib/oauth.test.ts (6)
945
+ [?25l ❯ test/integration/sdk.test.tsx (2)
946
+ ❯ OAuth login (2)
947
+ ✓ should set the correct auth url for login with redirect 341ms
948
+ ⠙ should initiate code exchange, validate tokens, and derive user from ID token
949
+ ✓ test/unit/nextjs/config.test.ts (10)
950
+ ✓ test/unit/server/login.test.ts (6)
951
+ ✓ test/unit/logger.test.ts (11)
952
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
953
+ ✓ test/unit/nextjs/middleware.test.ts (7)
954
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
955
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
956
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
957
+ ✓ test/unit/lib/oauth.test.ts (6)
958
+ [?25l ❯ test/integration/sdk.test.tsx (2)
959
+ ❯ OAuth login (2)
960
+ ✓ should set the correct auth url for login with redirect 341ms
961
+ ⠹ should initiate code exchange, validate tokens, and derive user from ID token
962
+ ✓ test/unit/nextjs/config.test.ts (10)
963
+ ✓ test/unit/server/login.test.ts (6)
964
+ ✓ test/unit/logger.test.ts (11)
965
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
966
+ ✓ test/unit/nextjs/middleware.test.ts (7)
967
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
968
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
969
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
970
+ ✓ test/unit/lib/oauth.test.ts (6)
971
+ [?25l ❯ test/integration/sdk.test.tsx (2)
972
+ ❯ OAuth login (2)
973
+ ✓ should set the correct auth url for login with redirect 341ms
974
+ ⠸ should initiate code exchange, validate tokens, and derive user from ID token
975
+ ✓ test/unit/nextjs/config.test.ts (10)
976
+ ✓ test/unit/server/login.test.ts (6)
977
+ ✓ test/unit/logger.test.ts (11)
978
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
979
+ ✓ test/unit/nextjs/middleware.test.ts (7)
980
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
981
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
982
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
983
+ ✓ test/unit/lib/oauth.test.ts (6)
984
+ [?25l ❯ test/integration/sdk.test.tsx (2)
985
+ ❯ OAuth login (2)
986
+ ✓ should set the correct auth url for login with redirect 341ms
987
+ ⠼ should initiate code exchange, validate tokens, and derive user from ID token
988
+ ✓ test/unit/nextjs/config.test.ts (10)
989
+ ✓ test/unit/server/login.test.ts (6)
990
+ ✓ test/unit/logger.test.ts (11)
991
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
992
+ ✓ test/unit/nextjs/middleware.test.ts (7)
993
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
994
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
995
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
996
+ ✓ test/unit/lib/oauth.test.ts (6)
997
+ [?25l ❯ test/integration/sdk.test.tsx (2)
998
+ ❯ OAuth login (2)
999
+ ✓ should set the correct auth url for login with redirect 341ms
1000
+ ⠴ should initiate code exchange, validate tokens, and derive user from ID token
1001
+ ✓ test/unit/nextjs/config.test.ts (10)
1002
+ ✓ test/unit/server/login.test.ts (6)
1003
+ ✓ test/unit/logger.test.ts (11)
1004
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1005
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1006
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1007
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1008
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1009
+ ✓ test/unit/lib/oauth.test.ts (6)
1010
+ [?25l ❯ test/integration/sdk.test.tsx (2)
1011
+ ❯ OAuth login (2)
1012
+ ✓ should set the correct auth url for login with redirect 341ms
1013
+ ⠦ should initiate code exchange, validate tokens, and derive user from ID token
1014
+ ✓ test/unit/nextjs/config.test.ts (10)
1015
+ ✓ test/unit/server/login.test.ts (6)
1016
+ ✓ test/unit/logger.test.ts (11)
1017
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1018
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1019
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1020
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1021
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1022
+ ✓ test/unit/lib/oauth.test.ts (6)
1023
+ [?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1024
+ ✓ test/unit/nextjs/config.test.ts (10)
1025
+ ✓ test/unit/server/login.test.ts (6)
1026
+ ✓ test/unit/logger.test.ts (11)
1027
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1028
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1029
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1030
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1031
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1032
+ ✓ test/unit/lib/oauth.test.ts (6)
1033
+ [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1034
+ ✓ test/unit/nextjs/config.test.ts (10)
1035
+ ✓ test/unit/server/login.test.ts (6)
1036
+ ✓ test/unit/logger.test.ts (11)
1037
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1038
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1039
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1040
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1041
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1042
+ ✓ test/unit/lib/oauth.test.ts (6)
1043
+ · test/unit/shared/storage.test.ts (3)
1044
+ [?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1045
+ ✓ test/unit/nextjs/config.test.ts (10)
1046
+ ✓ test/unit/server/login.test.ts (6)
1047
+ ✓ test/unit/logger.test.ts (11)
1048
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1049
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1050
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1051
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1052
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1053
+ ✓ test/unit/lib/oauth.test.ts (6)
1054
+ ✓ test/unit/shared/storage.test.ts (3)
1055
+ [?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1056
+ ✓ test/unit/nextjs/config.test.ts (10)
1057
+ ✓ test/unit/server/login.test.ts (6)
1058
+ ✓ test/unit/logger.test.ts (11)
1059
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1060
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1061
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1062
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1063
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1064
+ ✓ test/unit/lib/oauth.test.ts (6)
1065
+ ✓ test/unit/shared/storage.test.ts (3)
1066
+ · test/unit/utils.test.ts (4)
1067
+ [?25lstdout | test/unit/nextjs/getUser.test.ts
1068
+ process.env.NODE_ENV: development
1069
+ defaultServerSecure: false
1070
+
1071
+ [?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1072
+ ✓ test/unit/nextjs/config.test.ts (10)
1073
+ ✓ test/unit/server/login.test.ts (6)
1074
+ ✓ test/unit/logger.test.ts (11)
1075
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1076
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1077
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1078
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1079
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1080
+ ✓ test/unit/lib/oauth.test.ts (6)
1081
+ ✓ test/unit/shared/storage.test.ts (3)
1082
+ · test/unit/utils.test.ts (4)
1083
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1084
+ ✓ test/unit/nextjs/config.test.ts (10)
1085
+ ✓ test/unit/server/login.test.ts (6)
1086
+ ✓ test/unit/logger.test.ts (11)
1087
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1088
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1089
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1090
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1091
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1092
+ ✓ test/unit/lib/oauth.test.ts (6)
1093
+ ✓ test/unit/shared/storage.test.ts (3)
1094
+ · test/unit/server/session.test.ts (3)
1095
+ · test/unit/utils.test.ts (4)
1096
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1097
+ ✓ test/unit/nextjs/config.test.ts (10)
1098
+ ✓ test/unit/server/login.test.ts (6)
1099
+ ✓ test/unit/logger.test.ts (11)
1100
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1101
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1102
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1103
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1104
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1105
+ ✓ test/unit/lib/oauth.test.ts (6)
1106
+ ✓ test/unit/shared/storage.test.ts (3)
1107
+ · test/unit/server/session.test.ts (3)
1108
+ ✓ test/unit/utils.test.ts (4)
1109
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
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
+ [?25l[?25l[?25l[?25l[?25l[?25l ✓ test/unit/nextjs/config.test.ts (10)
1123
+ ✓ test/unit/server/login.test.ts (6)
1124
+ ✓ test/unit/logger.test.ts (11)
1125
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1126
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1127
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1128
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1129
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1130
+ ✓ test/unit/lib/oauth.test.ts (6)
1131
+ ✓ test/unit/shared/storage.test.ts (3)
1132
+ ✓ test/unit/server/session.test.ts (3)
1133
+ ✓ test/unit/utils.test.ts (4)
1134
+ · test/unit/shared/UserSession.test.ts (2)
1135
+ [?25l ✓ test/unit/server/login.test.ts (6)
1136
+ ✓ test/unit/logger.test.ts (11)
1137
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1138
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1139
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1140
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1141
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1142
+ ✓ test/unit/lib/oauth.test.ts (6)
1143
+ ✓ test/unit/shared/storage.test.ts (3)
1144
+ ✓ test/unit/server/session.test.ts (3)
1145
+ ✓ test/unit/utils.test.ts (4)
1146
+ ✓ test/unit/shared/UserSession.test.ts (2)
1147
+ · test/unit/nextjs/utils.test.ts (1)
1148
+ [?25l[?25l[?25l ✓ test/unit/server/login.test.ts (6)
1149
+ ✓ test/unit/logger.test.ts (11)
1150
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1151
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1152
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1153
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1154
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1155
+ ✓ test/unit/lib/oauth.test.ts (6)
1156
+ ✓ test/unit/shared/storage.test.ts (3)
1157
+ ✓ test/unit/server/session.test.ts (3)
1158
+ ✓ test/unit/utils.test.ts (4)
1159
+ ✓ test/unit/shared/UserSession.test.ts (2)
1160
+ ✓ test/unit/nextjs/utils.test.ts (1)
1161
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/unit/logger.test.ts (11)
1162
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1163
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1164
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1165
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1166
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1167
+ ✓ test/unit/lib/oauth.test.ts (6)
1168
+ ✓ test/unit/shared/storage.test.ts (3)
1169
+ ✓ test/unit/server/session.test.ts (3)
1170
+ ✓ test/unit/utils.test.ts (4)
1171
+ · test/unit/nextjs/getUser.test.ts (1)
1172
+ ✓ test/unit/shared/UserSession.test.ts (2)
1173
+ ✓ test/unit/nextjs/utils.test.ts (1)
1174
+ [?25l ✓ test/unit/services/AuthenticationService.test.ts (6)
1175
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1176
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1177
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1178
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1179
+ ✓ test/unit/lib/oauth.test.ts (6)
1180
+ ✓ test/unit/shared/storage.test.ts (3)
1181
+ ✓ test/unit/server/session.test.ts (3)
1182
+ ✓ test/unit/utils.test.ts (4)
1183
+ · test/unit/react/components/SignInButton.test.tsx (2)
1184
+ · test/unit/nextjs/getUser.test.ts (1)
1185
+ ✓ test/unit/shared/UserSession.test.ts (2)
1186
+ ✓ test/unit/nextjs/utils.test.ts (1)
1187
+ [?25l[?25l[?25l ✓ test/unit/services/AuthenticationService.test.ts (6)
1188
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1189
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1190
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1191
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1192
+ ✓ test/unit/lib/oauth.test.ts (6)
1193
+ ✓ test/unit/shared/storage.test.ts (3)
1194
+ ✓ test/unit/server/session.test.ts (3)
1195
+ ✓ test/unit/utils.test.ts (4)
1196
+ · test/unit/react/components/SignInButton.test.tsx (2)
1197
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1198
+ ✓ test/unit/shared/UserSession.test.ts (2)
1199
+ ✓ test/unit/nextjs/utils.test.ts (1)
1200
+ [?25l[?25l[?25l[?25l[?25l ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1201
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1202
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1203
+ ✓ test/unit/lib/oauth.test.ts (6)
1204
+ ✓ test/unit/shared/storage.test.ts (3)
1205
+ ✓ test/unit/server/session.test.ts (3)
1206
+ ✓ test/unit/utils.test.ts (4)
1207
+ · test/unit/react/components/SignInButton.test.tsx (2)
1208
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1209
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1210
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1211
+ ✓ test/unit/shared/UserSession.test.ts (2)
1212
+ ✓ test/unit/nextjs/utils.test.ts (1)
1213
+ [?25lstdout | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should render a SignInButton component
1214
+ BrowserAuthenticationService constructor {
1215
+ config: {
1216
+ clientId: 'test-client-id',
1217
+ redirectUrl: 'https://example.com',
1218
+ oauthServer: 'https://auth.civic.com/oauth',
1219
+ scopes: [
1220
+ 'openid',
1221
+ 'profile',
1222
+ 'email',
1223
+ 'forwardedTokens',
1224
+ 'offline_access'
1225
+ ],
1226
+ displayMode: 'iframe'
1227
+ }
1228
+ }
1229
+ BrowserAuthenticationInitiator constructor {
1230
+ clientId: 'test-client-id',
1231
+ redirectUrl: 'https://example.com',
1232
+ oauthServer: 'https://auth.civic.com/oauth',
1233
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1234
+ displayMode: 'iframe',
1235
+ state: 'eyJ1dWlkIjoiODJhNGNmMDMtNTg3Ny00MWMxLThmZjAtYzRmNjM2YzJjZjU4IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1236
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1237
+ }
1238
+ handleIframeLoad
1239
+
1240
+ stderr | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should render a SignInButton component
1241
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1242
+
1243
+ When testing, code that causes React state updates should be wrapped into act(...):
1244
+
1245
+ act(() => {
1246
+ /* fire events that update state */
1247
+ });
1248
+ /* assert on the output */
1249
+
1250
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
1251
+ at CivicAuthIframeContainer (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1252
+ at div
1253
+ at TokenProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
1254
+ at SessionProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
1255
+ at IframeProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
1256
+ at ConfigProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
1257
+ at AuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
1258
+ at QueryClientProvider (file:///Users/patrick/Code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1259
+ at CivicAuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1260
+
1261
+ stdout | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should call signIn when the button is clicked
1262
+ BrowserAuthenticationService constructor {
1263
+ config: {
1264
+ clientId: 'test-client-id',
1265
+ redirectUrl: 'https://example.com',
1266
+ oauthServer: 'https://auth.civic.com/oauth',
1267
+ scopes: [
1268
+ 'openid',
1269
+ 'profile',
1270
+ 'email',
1271
+ 'forwardedTokens',
1272
+ 'offline_access'
1273
+ ],
1274
+ displayMode: 'iframe'
1275
+ }
1276
+ }
1277
+ BrowserAuthenticationInitiator constructor {
1278
+ clientId: 'test-client-id',
1279
+ redirectUrl: 'https://example.com',
1280
+ oauthServer: 'https://auth.civic.com/oauth',
1281
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1282
+ displayMode: 'iframe',
1283
+ state: 'eyJ1dWlkIjoiNDI0Njg0MzMtMDAyNy00NmE2LTgzNmEtMTU0ZmY4ZjQzNDAyIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1284
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1285
+ }
1286
+ handleIframeLoad
1287
+
1288
+ stderr | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should call signIn when the button is clicked
1289
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1290
+
1291
+ When testing, code that causes React state updates should be wrapped into act(...):
1292
+
1293
+ act(() => {
1294
+ /* fire events that update state */
1295
+ });
1296
+ /* assert on the output */
1297
+
1298
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
1299
+ at CivicAuthIframeContainer (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1300
+ at div
1301
+ at TokenProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
1302
+ at SessionProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
1303
+ at IframeProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
1304
+ at ConfigProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
1305
+ at AuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
1306
+ at QueryClientProvider (file:///Users/patrick/Code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1307
+ at CivicAuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1308
+
1309
+ [?25l ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1310
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1311
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1312
+ ✓ test/unit/lib/oauth.test.ts (6)
1313
+ ✓ test/unit/shared/storage.test.ts (3)
1314
+ ✓ test/unit/server/session.test.ts (3)
1315
+ ✓ test/unit/utils.test.ts (4)
1316
+ · test/unit/react/components/SignInButton.test.tsx (2)
1317
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1318
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1319
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1320
+ ✓ test/unit/shared/UserSession.test.ts (2)
1321
+ ✓ test/unit/nextjs/utils.test.ts (1)
1322
+ [?25l[?25l[?25l[?25l ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1323
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1324
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1325
+ ✓ test/unit/lib/oauth.test.ts (6)
1326
+ ✓ test/unit/shared/storage.test.ts (3)
1327
+ ✓ test/unit/server/session.test.ts (3)
1328
+ ✓ test/unit/utils.test.ts (4)
1329
+ ✓ test/unit/react/components/SignInButton.test.tsx (2)
1330
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1331
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1332
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1333
+ ✓ test/unit/shared/UserSession.test.ts (2)
1334
+ ✓ test/unit/nextjs/utils.test.ts (1)
1335
+ stdout | test/unit/nextjs/NextAuthProvider.test.tsx > CivicNextAuthProvider > should call resolveAuthConfig with no arguments
1336
+ BrowserAuthenticationService constructor {
1337
+ config: {
1338
+ clientId: 'test-client-id',
1339
+ redirectUrl: 'https://example.com/callback',
1340
+ oauthServer: 'https://example.com',
1341
+ scopes: [
1342
+ 'openid',
1343
+ 'profile',
1344
+ 'email',
1345
+ 'forwardedTokens',
1346
+ 'offline_access'
1347
+ ],
1348
+ displayMode: 'iframe'
1349
+ }
1350
+ }
1351
+ BrowserAuthenticationInitiator constructor {
1352
+ clientId: 'test-client-id',
1353
+ redirectUrl: 'https://example.com/callback',
1354
+ oauthServer: 'https://example.com',
1355
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1356
+ displayMode: 'iframe',
1357
+ state: 'eyJ1dWlkIjoiNmQ1YTc5NGQtMDlmNi00Yjk4LTlhZjktZTk0MjY3NTM4ZjMzIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1358
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1359
+ }
1360
+ handleIframeLoad
1361
+
1362
+ stderr | test/unit/nextjs/NextAuthProvider.test.tsx > CivicNextAuthProvider > should call resolveAuthConfig with no arguments
1363
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1364
+
1365
+ When testing, code that causes React state updates should be wrapped into act(...):
1366
+
1367
+ act(() => {
1368
+ /* fire events that update state */
1369
+ });
1370
+ /* assert on the output */
1371
+
1372
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
1373
+ at CivicAuthIframeContainer (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1374
+ at div
1375
+ at TokenProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
1376
+ at SessionProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
1377
+ at IframeProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
1378
+ at ConfigProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
1379
+ at AuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
1380
+ at CivicNextAuthProviderInternal (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/nextjs/providers/NextAuthProvider.tsx:26:3)
1381
+ at QueryClientProvider (file:///Users/patrick/Code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1382
+ at CivicNextAuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/nextjs/providers/NextAuthProvider.tsx:75:3)
1383
+
1384
+ stdout | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should render a SignOutButton component
1385
+ BrowserAuthenticationService constructor {
1386
+ config: {
1387
+ clientId: 'test-client-id',
1388
+ redirectUrl: 'https://example.com',
1389
+ oauthServer: 'https://auth.civic.com/oauth',
1390
+ scopes: [
1391
+ 'openid',
1392
+ 'profile',
1393
+ 'email',
1394
+ 'forwardedTokens',
1395
+ 'offline_access'
1396
+ ],
1397
+ displayMode: 'iframe'
1398
+ }
1399
+ }
1400
+ BrowserAuthenticationInitiator constructor {
1401
+ clientId: 'test-client-id',
1402
+ redirectUrl: 'https://example.com',
1403
+ oauthServer: 'https://auth.civic.com/oauth',
1404
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1405
+ displayMode: 'iframe',
1406
+ state: 'eyJ1dWlkIjoiYmY0ODM0YjctOTkzNC00YWZlLTk5N2MtNGRhOTYyZjFiNzUwIiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1407
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1408
+ }
1409
+ handleIframeLoad
1410
+
1411
+ [?25l ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1412
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1413
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1414
+ ✓ test/unit/lib/oauth.test.ts (6)
1415
+ ✓ test/unit/shared/storage.test.ts (3)
1416
+ ✓ test/unit/server/session.test.ts (3)
1417
+ ✓ test/unit/utils.test.ts (4)
1418
+ ✓ test/unit/react/components/SignInButton.test.tsx (2)
1419
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1420
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1421
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1422
+ ✓ test/unit/shared/UserSession.test.ts (2)
1423
+ ✓ test/unit/nextjs/utils.test.ts (1)
1424
+ stderr | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should render a SignOutButton component
1425
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1426
+
1427
+ When testing, code that causes React state updates should be wrapped into act(...):
1428
+
1429
+ act(() => {
1430
+ /* fire events that update state */
1431
+ });
1432
+ /* assert on the output */
1433
+
1434
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
1435
+ at CivicAuthIframeContainer (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1436
+ at div
1437
+ at TokenProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
1438
+ at SessionProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
1439
+ at IframeProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
1440
+ at ConfigProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
1441
+ at AuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
1442
+ at QueryClientProvider (file:///Users/patrick/Code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1443
+ at CivicAuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1444
+
1445
+ stdout | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should call signIn when the button is clicked
1446
+ BrowserAuthenticationService constructor {
1447
+ config: {
1448
+ clientId: 'test-client-id',
1449
+ redirectUrl: 'https://example.com',
1450
+ oauthServer: 'https://auth.civic.com/oauth',
1451
+ scopes: [
1452
+ 'openid',
1453
+ 'profile',
1454
+ 'email',
1455
+ 'forwardedTokens',
1456
+ 'offline_access'
1457
+ ],
1458
+ displayMode: 'iframe'
1459
+ }
1460
+ }
1461
+ BrowserAuthenticationInitiator constructor {
1462
+ clientId: 'test-client-id',
1463
+ redirectUrl: 'https://example.com',
1464
+ oauthServer: 'https://auth.civic.com/oauth',
1465
+ scopes: [ 'openid', 'profile', 'email', 'forwardedTokens', 'offline_access' ],
1466
+ displayMode: 'iframe',
1467
+ state: 'eyJ1dWlkIjoiODQ5YjRlMzctZmY1MC00YjlmLWE0MzYtNGMyNzU0ODQ2ZWQ0IiwiZGlzcGxheU1vZGUiOiJpZnJhbWUifQ==',
1468
+ pkceConsumer: BrowserPublicClientPKCEProducer { storage: LocalStorageAdapter {} }
1469
+ }
1470
+ handleIframeLoad
1471
+
1472
+ stderr | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should call signIn when the button is clicked
1473
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1474
+
1475
+ When testing, code that causes React state updates should be wrapped into act(...):
1476
+
1477
+ act(() => {
1478
+ /* fire events that update state */
1479
+ });
1480
+ /* assert on the output */
1481
+
1482
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
1483
+ at CivicAuthIframeContainer (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1484
+ at div
1485
+ at TokenProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
1486
+ at SessionProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
1487
+ at IframeProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
1488
+ at ConfigProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
1489
+ at AuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
1490
+ at QueryClientProvider (file:///Users/patrick/Code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
1491
+ at CivicAuthProvider (/Users/patrick/Code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1492
+
1493
+ [?25l ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1494
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1495
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1496
+ ✓ test/unit/lib/oauth.test.ts (6)
1497
+ ✓ test/unit/shared/storage.test.ts (3)
1498
+ ✓ test/unit/server/session.test.ts (3)
1499
+ ✓ test/unit/utils.test.ts (4)
1500
+ ✓ test/unit/react/components/SignInButton.test.tsx (2)
1501
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1502
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1503
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1504
+ ✓ test/unit/shared/UserSession.test.ts (2)
1505
+ ✓ test/unit/nextjs/utils.test.ts (1)
1506
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1507
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1508
+ ✓ test/unit/lib/oauth.test.ts (6)
1509
+ ✓ test/unit/shared/storage.test.ts (3)
1510
+ ✓ test/unit/server/session.test.ts (3)
1511
+ ✓ test/unit/utils.test.ts (4)
1512
+ ✓ test/unit/react/components/SignInButton.test.tsx (2)
1513
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1514
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1515
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1516
+ ✓ test/unit/shared/UserSession.test.ts (2)
1517
+ ✓ test/unit/nextjs/utils.test.ts (1)
1518
+ · test/unit/publicApi/apiSnapshot.test.ts (1)
1519
+ [?25l[?25l[?25l ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1520
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1521
+ ✓ test/unit/lib/oauth.test.ts (6)
1522
+ ✓ test/unit/shared/storage.test.ts (3)
1523
+ ✓ test/unit/server/session.test.ts (3)
1524
+ ✓ test/unit/utils.test.ts (4)
1525
+ ✓ test/unit/react/components/SignInButton.test.tsx (2)
1526
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1527
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1528
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1529
+ ✓ test/unit/shared/UserSession.test.ts (2)
1530
+ ✓ test/unit/nextjs/utils.test.ts (1)
1531
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1532
+ [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1533
+ ✓ test/unit/logger.test.ts (11)
1534
+ ✓ test/unit/utils.test.ts (4)
1535
+ ✓ test/unit/lib/oauth.test.ts (6)
1536
+ ✓ test/unit/server/login.test.ts (6)
1537
+ ✓ test/unit/server/session.test.ts (3)
1538
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1539
+ ✓ test/unit/nextjs/config.test.ts (10)
1540
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1541
+ ✓ test/unit/nextjs/middleware.test.ts (7)
1542
+ ✓ test/unit/nextjs/utils.test.ts (1)
1543
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1544
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1545
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1546
+ ✓ test/unit/shared/UserSession.test.ts (2)
1547
+ ✓ test/unit/shared/storage.test.ts (3)
1548
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1549
+ ✓ test/unit/react/components/SignInButton.test.tsx (2)
1550
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1551
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1552
+
1553
+  Test Files  20 passed (20)
1554
+  Tests  79 passed (79)
1555
+  Start at  19:48:09
1556
+  Duration  4.52s (transform 725ms, setup 0ms, collect 5.66s, tests 1.16s, environment 18.29s, prepare 4.19s)
1557
+
1558
+  % Coverage report from v8
1559
+ -----------------------------------------|---------|----------|---------|---------|---------------------------------
1560
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1561
+ -----------------------------------------|---------|----------|---------|---------|---------------------------------
1562
+ All files  |  80.51 |  85.94 |  70.76 |  80.51 |  
1563
+  src  |  100 |  100 |  100 |  100 |  
1564
+  config.ts  |  100 |  100 |  100 |  100 |  
1565
+  constants.ts  |  100 |  100 |  100 |  100 |  
1566
+ index.ts | 0 | 0 | 0 | 0 |  
1567
+ types.ts | 0 | 0 | 0 | 0 |  
1568
+  utils.ts  |  100 |  100 |  100 |  100 |  
1569
+  src/browser  |  100 |  100 |  100 |  100 |  
1570
+  storage.ts  |  100 |  100 |  100 |  100 |  
1571
+  src/lib  |  70.87 |  81.48 |  83.33 |  70.87 |  
1572
+  cookies.ts  |  4.16 |  100 |  0 |  4.16 | 2-27 
1573
+  jwt.ts  |  100 |  100 |  100 |  100 |  
1574
+  logger.ts  |  100 |  100 |  100 |  100 |  
1575
+  oauth.ts  |  83.63 |  81.81 |  83.33 |  83.63 | 6,68-75 
1576
+  postMessage.ts  |  5.55 |  100 |  0 |  5.55 | 4-20 
1577
+  windowUtil.ts  |  82.6 |  57.14 |  100 |  82.6 | 6-7,11-12 
1578
+  src/nextjs  |  47.17 |  86.04 |  40.74 |  47.17 |  
1579
+  GetUser.ts  |  100 |  33.33 |  100 |  100 | 14-20 
1580
+  config.ts  |  99.2 |  81.25 |  100 |  99.2 | 126 
1581
+  cookies.ts  |  19.09 |  100 |  10 |  19.09 | ...-124,127-139,152-153,156-157
1582
+  index.ts  |  100 |  100 |  100 |  100 |  
1583
+  middleware.ts  |  100 |  95.45 |  100 |  100 | 49 
1584
+  routeHandler.ts  |  4.23 |  100 |  0 |  4.23 | 29-34,42-211,220-255,271-301 
1585
+  utils.ts  |  100 |  100 |  100 |  100 |  
1586
+  src/nextjs/hooks  |  11.29 |  100 |  0 |  11.29 |  
1587
+  index.ts  |  100 |  100 |  100 |  100 |  
1588
+  useTokenCookie.ts  |  9.67 |  100 |  0 |  9.67 | 9-14,17-41 
1589
+  useUserCookie.ts  |  10 |  100 |  0 |  10 | 10-14,17-41 
1590
+  src/nextjs/middleware  |  100 |  100 |  100 |  100 |  
1591
+  index.ts  |  100 |  100 |  100 |  100 |  
1592
+  src/nextjs/providers  |  87.93 |  71.42 |  66.66 |  87.93 |  
1593
+  NextAuthProvider.tsx  |  87.93 |  71.42 |  66.66 |  87.93 | 47-53 
1594
+  src/reactjs  |  100 |  100 |  100 |  100 |  
1595
+  index.ts  |  100 |  100 |  100 |  100 |  
1596
+  src/reactjs/components  |  19.81 |  100 |  57.14 |  19.81 |  
1597
+  SignInButton.tsx  |  100 |  100 |  100 |  100 |  
1598
+  SignOutButton.tsx  |  100 |  100 |  100 |  100 |  
1599
+  UserButton.tsx  |  2.29 |  100 |  0 |  2.29 | 7-20,24-37,41-213 
1600
+  index.ts  |  100 |  100 |  100 |  100 |  
1601
+  src/reactjs/hooks  |  44.44 |  33.33 |  50 |  44.44 |  
1602
+  index.ts  |  100 |  100 |  100 |  100 |  
1603
+  useAuth.ts  |  0 |  0 |  0 |  0 | 1-13 
1604
+  useUser.ts  |  77.77 |  50 |  100 |  77.77 | 14-15 
1605
+  src/reactjs/providers  |  100 |  100 |  100 |  100 |  
1606
+  index.ts  |  100 |  100 |  100 |  100 |  
1607
+  src/server  |  86.04 |  73.68 |  76.92 |  86.04 |  
1608
+  ServerAuthenticationResolver.ts  |  97.4 |  88.88 |  85.71 |  97.4 | 36-37 
1609
+ config.ts | 0 | 0 | 0 | 0 |  
1610
+  index.ts  |  0 |  0 |  0 |  0 | 1 
1611
+  login.ts  |  100 |  71.42 |  100 |  100 | 23,53 
1612
+  refresh.ts  |  0 |  0 |  0 |  0 | 1-23 
1613
+  src/services  |  69.81 |  72.72 |  84 |  69.81 |  
1614
+  AuthenticationService.ts  |  69.31 |  67.85 |  88.88 |  69.31 | ...-113,118-130,273-274,305-323
1615
+  PKCE.ts  |  77.77 |  100 |  83.33 |  77.77 | 12-17 
1616
+  types.ts  |  50 |  100 |  0 |  50 | 51-53 
1617
+  src/shared/components  |  93.45 |  86.36 |  71.42 |  93.45 |  
1618
+  CivicAuthIframe.tsx  |  100 |  100 |  100 |  100 |  
1619
+  CivicAuthIframeContainer.tsx  |  90.2 |  84.21 |  60 |  90.2 | 15-22,128-129,144-147,162-163 
1620
+  CloseIcon.tsx  |  100 |  100 |  100 |  100 |  
1621
+  LoadingIcon.tsx  |  100 |  100 |  100 |  100 |  
1622
+  src/shared/hooks  |  75.6 |  50 |  100 |  75.6 |  
1623
+  index.ts  |  100 |  100 |  100 |  100 |  
1624
+  useAuth.ts  |  75 |  50 |  100 |  75 | 9-10 
1625
+  useConfig.ts  |  75 |  50 |  100 |  75 | 9-10 
1626
+  useIframe.ts  |  75 |  50 |  100 |  75 | 9-10 
1627
+  useSession.ts  |  75 |  50 |  100 |  75 | 9-10 
1628
+  useToken.ts  |  75 |  50 |  100 |  75 | 9-10 
1629
+  src/shared/lib  |  92.85 |  86 |  90.9 |  92.85 |  
1630
+  GenericAuthenticationRefresher.ts  |  100 |  85.71 |  100 |  100 | 60 
1631
+  UserSession.ts  |  100 |  87.5 |  100 |  100 | 22 
1632
+  session.ts  |  100 |  100 |  100 |  100 |  
1633
+  storage.ts  |  100 |  100 |  100 |  100 |  
1634
+  types.ts  |  100 |  100 |  100 |  100 |  
1635
+  util.ts  |  88.15 |  75 |  81.81 |  88.15 | ...81-82,90-101,133-137,162-164
1636
+  src/shared/providers  |  85.36 |  77.01 |  61.11 |  85.36 |  
1637
+  AuthContext.tsx  |  100 |  100 |  100 |  100 |  
1638
+  AuthProvider.tsx  |  80.06 |  72.13 |  50 |  80.06 | ...-315,317-318,329-330,375-379
1639
+  CivicAuthProvider.tsx  |  100 |  100 |  100 |  100 |  
1640
+  ConfigProvider.tsx  |  100 |  100 |  100 |  100 |  
1641
+  IframeProvider.tsx  |  100 |  100 |  50 |  100 |  
1642
+  SessionProvider.tsx  |  100 |  100 |  100 |  100 |  
1643
+  TokenProvider.tsx  |  88.88 |  84.61 |  33.33 |  88.88 | 30-31,34-35,49 
1644
+  UserProvider.tsx  |  95.45 |  87.5 |  100 |  95.45 | 42-43 
1645
+  test/integration  |  98.96 |  94.11 |  100 |  98.96 |  
1646
+  sdk.test.tsx  |  98.96 |  94.11 |  100 |  98.96 | 31-32 
1647
+  test/support  |  100 |  100 |  100 |  100 |  
1648
+  fixtures.ts  |  100 |  100 |  100 |  100 |  
1649
+  test/unit  |  100 |  100 |  100 |  100 |  
1650
+  logger.test.ts  |  100 |  100 |  100 |  100 |  
1651
+  utils.test.ts  |  100 |  100 |  100 |  100 |  
1652
+  test/unit/lib  |  100 |  100 |  100 |  100 |  
1653
+  oauth.test.ts  |  100 |  100 |  100 |  100 |  
1654
+  test/unit/nextjs  |  99.7 |  97.67 |  100 |  99.7 |  
1655
+  NextAuthProvider.test.tsx  |  100 |  100 |  100 |  100 |  
1656
+  config.test.ts  |  100 |  100 |  100 |  100 |  
1657
+  getUser.test.ts  |  97.29 |  87.5 |  100 |  97.29 | 31 
1658
+  middleware.test.ts  |  100 |  100 |  100 |  100 |  
1659
+  utils.test.ts  |  100 |  100 |  100 |  100 |  
1660
+  test/unit/publicApi  |  100 |  100 |  100 |  100 |  
1661
+  apiSnapshot.test.ts  |  100 |  100 |  100 |  100 |  
1662
+  test/unit/react/components  |  100 |  100 |  0 |  100 |  
1663
+  SignInButton.test.tsx  |  100 |  100 |  0 |  100 |  
1664
+  SignOutButton.test.tsx  |  100 |  100 |  0 |  100 |  
1665
+  test/unit/server  |  97.7 |  76.19 |  33.33 |  97.7 |  
1666
+  login.test.ts  |  97.12 |  68.75 |  33.33 |  97.12 | 23-24,27-28 
1667
+  session.test.ts  |  100 |  100 |  100 |  100 |  
1668
+  test/unit/services  |  100 |  100 |  100 |  100 |  
1669
+  AuthenticationService.test.ts  |  100 |  100 |  100 |  100 |  
1670
+  ServerAuthenticationResolver.test.ts  |  100 |  100 |  100 |  100 |  
1671
+  test/unit/shared  |  100 |  100 |  100 |  100 |  
1672
+  GenericAuthenticationRefresher.test.ts |  100 |  100 |  100 |  100 |  
1673
+  UserSession.test.ts  |  100 |  100 |  100 |  100 |  
1674
+  storage.test.ts  |  100 |  100 |  100 |  100 |  
1675
+  test/unit/shared/components  |  100 |  100 |  100 |  100 |  
1676
+  CivicAuthIframeContainer.test.tsx  |  100 |  100 |  100 |  100 |  
1677
+ -----------------------------------------|---------|----------|---------|---------|---------------------------------
1678
+ [?25h[?25h