@civic/auth 0.0.1-beta.30 → 0.0.1-beta.31

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 (478) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/.turbo/turbo-lint$colon$fix.log +16 -0
  3. package/.turbo/turbo-test.log +552 -1077
  4. package/dist/{src/shared/providers → cjs/src/shared}/AuthProvider.d.ts +7 -9
  5. package/dist/cjs/src/shared/AuthProvider.d.ts.map +1 -0
  6. package/dist/{src/shared/providers → cjs/src/shared}/AuthProvider.js +70 -87
  7. package/dist/cjs/src/shared/AuthProvider.js.map +1 -0
  8. package/dist/{src/shared/providers → cjs/src/shared}/CivicAuthProvider.d.ts +3 -3
  9. package/dist/cjs/src/shared/CivicAuthProvider.d.ts.map +1 -0
  10. package/dist/cjs/src/shared/CivicAuthProvider.js +19 -0
  11. package/dist/cjs/src/shared/CivicAuthProvider.js.map +1 -0
  12. package/dist/{src/shared/lib → cjs/src/shared}/GenericAuthenticationRefresher.d.ts +4 -4
  13. package/dist/cjs/src/shared/GenericAuthenticationRefresher.d.ts.map +1 -0
  14. package/dist/{src/shared/lib → cjs/src/shared}/GenericAuthenticationRefresher.js +11 -7
  15. package/dist/cjs/src/shared/GenericAuthenticationRefresher.js.map +1 -0
  16. package/dist/{src/shared/providers → cjs/src/shared}/UserProvider.d.ts +6 -7
  17. package/dist/cjs/src/shared/UserProvider.d.ts.map +1 -0
  18. package/dist/cjs/src/shared/UserProvider.js +42 -0
  19. package/dist/cjs/src/shared/UserProvider.js.map +1 -0
  20. package/dist/cjs/src/shared/UserSession.d.ts +12 -0
  21. package/dist/cjs/src/shared/UserSession.d.ts.map +1 -0
  22. package/dist/cjs/src/shared/UserSession.js +24 -0
  23. package/dist/cjs/src/shared/UserSession.js.map +1 -0
  24. package/dist/cjs/src/shared/session.d.ts +3 -0
  25. package/dist/cjs/src/shared/session.d.ts.map +1 -0
  26. package/dist/cjs/src/shared/session.js +13 -0
  27. package/dist/cjs/src/shared/session.js.map +1 -0
  28. package/dist/{src/shared/lib → cjs/src/shared}/util.d.ts +10 -4
  29. package/dist/cjs/src/shared/util.d.ts.map +1 -0
  30. package/dist/cjs/src/shared/util.js +162 -0
  31. package/dist/cjs/src/shared/util.js.map +1 -0
  32. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  33. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  34. package/dist/src/nextjs/cookies.d.ts.map +1 -1
  35. package/dist/src/nextjs/cookies.js +12 -8
  36. package/dist/src/nextjs/cookies.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +3 -3
  39. package/.turbo/turbo-lint.log +0 -14
  40. package/civic-auth-0.0.1-beta.15.tgz +0 -0
  41. package/civic-auth-0.0.1-beta.17.tgz +0 -0
  42. package/dist/AuthProvider-BYZ8w92b.d.mts +0 -15
  43. package/dist/AuthProvider-BgOwv9h8.d.ts +0 -15
  44. package/dist/AuthProvider-Bj_Prt1x.d.ts +0 -21
  45. package/dist/AuthProvider-DUAoX4G9.d.mts +0 -21
  46. package/dist/UserProvider-BA2uflVB.d.ts +0 -16
  47. package/dist/UserProvider-Bl3j1PUO.d.mts +0 -16
  48. package/dist/UserProvider-CMLaYOUD.d.ts +0 -16
  49. package/dist/UserProvider-Cbm8MZkJ.d.mts +0 -16
  50. package/dist/chunk-4PLCDPEN.mjs +0 -599
  51. package/dist/chunk-4PLCDPEN.mjs.map +0 -1
  52. package/dist/chunk-5UQQYXCX.js +0 -1
  53. package/dist/chunk-5UQQYXCX.js.map +0 -1
  54. package/dist/chunk-63YGK3A7.mjs +0 -223
  55. package/dist/chunk-63YGK3A7.mjs.map +0 -1
  56. package/dist/chunk-6RFRDWIP.js +0 -223
  57. package/dist/chunk-6RFRDWIP.js.map +0 -1
  58. package/dist/chunk-7K3QN2AT.js +0 -599
  59. package/dist/chunk-7K3QN2AT.js.map +0 -1
  60. package/dist/chunk-AM2Y662I.js +0 -601
  61. package/dist/chunk-AM2Y662I.js.map +0 -1
  62. package/dist/chunk-AP4627CS.mjs +0 -223
  63. package/dist/chunk-AP4627CS.mjs.map +0 -1
  64. package/dist/chunk-CRTRMMJ7.js +0 -59
  65. package/dist/chunk-CRTRMMJ7.js.map +0 -1
  66. package/dist/chunk-CTVJJBBA.js +0 -118
  67. package/dist/chunk-CTVJJBBA.js.map +0 -1
  68. package/dist/chunk-EKLYHP2D.mjs +0 -711
  69. package/dist/chunk-EKLYHP2D.mjs.map +0 -1
  70. package/dist/chunk-FHRZSX3C.js +0 -710
  71. package/dist/chunk-FHRZSX3C.js.map +0 -1
  72. package/dist/chunk-GB3H3I47.js +0 -711
  73. package/dist/chunk-GB3H3I47.js.map +0 -1
  74. package/dist/chunk-JDZPCA3P.js +0 -173
  75. package/dist/chunk-JDZPCA3P.js.map +0 -1
  76. package/dist/chunk-JEOPLLWO.js +0 -223
  77. package/dist/chunk-JEOPLLWO.js.map +0 -1
  78. package/dist/chunk-MK7557NR.mjs +0 -118
  79. package/dist/chunk-MK7557NR.mjs.map +0 -1
  80. package/dist/chunk-NLRREFOX.mjs +0 -710
  81. package/dist/chunk-NLRREFOX.mjs.map +0 -1
  82. package/dist/chunk-O3WGNLRO.mjs +0 -173
  83. package/dist/chunk-O3WGNLRO.mjs.map +0 -1
  84. package/dist/chunk-OXXUQ36U.mjs +0 -283
  85. package/dist/chunk-OXXUQ36U.mjs.map +0 -1
  86. package/dist/chunk-PMJAV4JJ.mjs +0 -1
  87. package/dist/chunk-PMJAV4JJ.mjs.map +0 -1
  88. package/dist/chunk-Q7DSPTUG.mjs +0 -601
  89. package/dist/chunk-Q7DSPTUG.mjs.map +0 -1
  90. package/dist/chunk-RGHW4PYM.mjs +0 -59
  91. package/dist/chunk-RGHW4PYM.mjs.map +0 -1
  92. package/dist/chunk-TH6FI2XI.js +0 -283
  93. package/dist/chunk-TH6FI2XI.js.map +0 -1
  94. package/dist/index.css +0 -340
  95. package/dist/index.css.map +0 -1
  96. package/dist/index.d.mts +0 -5
  97. package/dist/index.d.ts +0 -5
  98. package/dist/index.js +0 -3
  99. package/dist/index.js.map +0 -1
  100. package/dist/index.mjs +0 -3
  101. package/dist/index.mjs.map +0 -1
  102. package/dist/nextjs/client.css +0 -340
  103. package/dist/nextjs/client.css.map +0 -1
  104. package/dist/nextjs/client.d.mts +0 -10
  105. package/dist/nextjs/client.d.ts +0 -10
  106. package/dist/nextjs/client.js +0 -185
  107. package/dist/nextjs/client.js.map +0 -1
  108. package/dist/nextjs/client.mjs +0 -185
  109. package/dist/nextjs/client.mjs.map +0 -1
  110. package/dist/nextjs.d.mts +0 -267
  111. package/dist/nextjs.d.ts +0 -267
  112. package/dist/nextjs.js +0 -315
  113. package/dist/nextjs.js.map +0 -1
  114. package/dist/nextjs.mjs +0 -315
  115. package/dist/nextjs.mjs.map +0 -1
  116. package/dist/react.d.mts +0 -65
  117. package/dist/react.d.ts +0 -65
  118. package/dist/react.js +0 -226
  119. package/dist/react.js.map +0 -1
  120. package/dist/react.mjs +0 -226
  121. package/dist/react.mjs.map +0 -1
  122. package/dist/server.d.mts +0 -35
  123. package/dist/server.d.ts +0 -35
  124. package/dist/server.js +0 -20
  125. package/dist/server.js.map +0 -1
  126. package/dist/server.mjs +0 -20
  127. package/dist/server.mjs.map +0 -1
  128. package/dist/src/browser/storage.d.ts +0 -6
  129. package/dist/src/browser/storage.d.ts.map +0 -1
  130. package/dist/src/browser/storage.js +0 -9
  131. package/dist/src/browser/storage.js.map +0 -1
  132. package/dist/src/config.d.ts +0 -3
  133. package/dist/src/config.d.ts.map +0 -1
  134. package/dist/src/config.js +0 -5
  135. package/dist/src/config.js.map +0 -1
  136. package/dist/src/constants.d.ts +0 -9
  137. package/dist/src/constants.d.ts.map +0 -1
  138. package/dist/src/constants.js +0 -17
  139. package/dist/src/constants.js.map +0 -1
  140. package/dist/src/index.d.ts +0 -4
  141. package/dist/src/index.d.ts.map +0 -1
  142. package/dist/src/index.js +0 -2
  143. package/dist/src/index.js.map +0 -1
  144. package/dist/src/lib/cookies.d.ts +0 -7
  145. package/dist/src/lib/cookies.d.ts.map +0 -1
  146. package/dist/src/lib/cookies.js +0 -23
  147. package/dist/src/lib/cookies.js.map +0 -1
  148. package/dist/src/lib/jwt.d.ts +0 -3
  149. package/dist/src/lib/jwt.d.ts.map +0 -1
  150. package/dist/src/lib/jwt.js +0 -9
  151. package/dist/src/lib/jwt.js.map +0 -1
  152. package/dist/src/lib/logger.d.ts +0 -26
  153. package/dist/src/lib/logger.d.ts.map +0 -1
  154. package/dist/src/lib/logger.js +0 -55
  155. package/dist/src/lib/logger.js.map +0 -1
  156. package/dist/src/lib/oauth.d.ts +0 -19
  157. package/dist/src/lib/oauth.d.ts.map +0 -1
  158. package/dist/src/lib/oauth.js +0 -60
  159. package/dist/src/lib/oauth.js.map +0 -1
  160. package/dist/src/lib/postMessage.d.ts +0 -4
  161. package/dist/src/lib/postMessage.d.ts.map +0 -1
  162. package/dist/src/lib/postMessage.js +0 -15
  163. package/dist/src/lib/postMessage.js.map +0 -1
  164. package/dist/src/lib/windowUtil.d.ts +0 -4
  165. package/dist/src/lib/windowUtil.d.ts.map +0 -1
  166. package/dist/src/lib/windowUtil.js +0 -30
  167. package/dist/src/lib/windowUtil.js.map +0 -1
  168. package/dist/src/nextjs/GetUser.d.ts +0 -6
  169. package/dist/src/nextjs/GetUser.d.ts.map +0 -1
  170. package/dist/src/nextjs/GetUser.js +0 -18
  171. package/dist/src/nextjs/GetUser.js.map +0 -1
  172. package/dist/src/nextjs/config.d.ts +0 -178
  173. package/dist/src/nextjs/config.d.ts.map +0 -1
  174. package/dist/src/nextjs/config.js +0 -164
  175. package/dist/src/nextjs/config.js.map +0 -1
  176. package/dist/src/nextjs/cookies.d.ts +0 -30
  177. package/dist/src/nextjs/hooks/index.d.ts +0 -2
  178. package/dist/src/nextjs/hooks/index.d.ts.map +0 -1
  179. package/dist/src/nextjs/hooks/index.js +0 -2
  180. package/dist/src/nextjs/hooks/index.js.map +0 -1
  181. package/dist/src/nextjs/hooks/useTokenCookie.d.ts +0 -3
  182. package/dist/src/nextjs/hooks/useTokenCookie.d.ts.map +0 -1
  183. package/dist/src/nextjs/hooks/useTokenCookie.js +0 -37
  184. package/dist/src/nextjs/hooks/useTokenCookie.js.map +0 -1
  185. package/dist/src/nextjs/hooks/useUserCookie.d.ts +0 -3
  186. package/dist/src/nextjs/hooks/useUserCookie.d.ts.map +0 -1
  187. package/dist/src/nextjs/hooks/useUserCookie.js +0 -36
  188. package/dist/src/nextjs/hooks/useUserCookie.js.map +0 -1
  189. package/dist/src/nextjs/index.d.ts +0 -7
  190. package/dist/src/nextjs/index.d.ts.map +0 -1
  191. package/dist/src/nextjs/index.js +0 -6
  192. package/dist/src/nextjs/index.js.map +0 -1
  193. package/dist/src/nextjs/middleware/index.d.ts +0 -2
  194. package/dist/src/nextjs/middleware/index.d.ts.map +0 -1
  195. package/dist/src/nextjs/middleware/index.js +0 -2
  196. package/dist/src/nextjs/middleware/index.js.map +0 -1
  197. package/dist/src/nextjs/middleware.d.ts +0 -59
  198. package/dist/src/nextjs/middleware.d.ts.map +0 -1
  199. package/dist/src/nextjs/middleware.js +0 -107
  200. package/dist/src/nextjs/middleware.js.map +0 -1
  201. package/dist/src/nextjs/providers/NextAuthProvider.d.ts +0 -9
  202. package/dist/src/nextjs/providers/NextAuthProvider.d.ts.map +0 -1
  203. package/dist/src/nextjs/providers/NextAuthProvider.js +0 -50
  204. package/dist/src/nextjs/providers/NextAuthProvider.js.map +0 -1
  205. package/dist/src/nextjs/routeHandler.d.ts +0 -18
  206. package/dist/src/nextjs/routeHandler.d.ts.map +0 -1
  207. package/dist/src/nextjs/routeHandler.js +0 -216
  208. package/dist/src/nextjs/routeHandler.js.map +0 -1
  209. package/dist/src/nextjs/utils.d.ts +0 -3
  210. package/dist/src/nextjs/utils.d.ts.map +0 -1
  211. package/dist/src/nextjs/utils.js +0 -5
  212. package/dist/src/nextjs/utils.js.map +0 -1
  213. package/dist/src/reactjs/components/SignInButton.d.ts +0 -8
  214. package/dist/src/reactjs/components/SignInButton.d.ts.map +0 -1
  215. package/dist/src/reactjs/components/SignInButton.js +0 -14
  216. package/dist/src/reactjs/components/SignInButton.js.map +0 -1
  217. package/dist/src/reactjs/components/SignOutButton.d.ts +0 -6
  218. package/dist/src/reactjs/components/SignOutButton.d.ts.map +0 -1
  219. package/dist/src/reactjs/components/SignOutButton.js +0 -14
  220. package/dist/src/reactjs/components/SignOutButton.js.map +0 -1
  221. package/dist/src/reactjs/components/UserButton.d.ts +0 -8
  222. package/dist/src/reactjs/components/UserButton.d.ts.map +0 -1
  223. package/dist/src/reactjs/components/UserButton.js +0 -110
  224. package/dist/src/reactjs/components/UserButton.js.map +0 -1
  225. package/dist/src/reactjs/components/index.d.ts +0 -6
  226. package/dist/src/reactjs/components/index.d.ts.map +0 -1
  227. package/dist/src/reactjs/components/index.js +0 -6
  228. package/dist/src/reactjs/components/index.js.map +0 -1
  229. package/dist/src/reactjs/hooks/index.d.ts +0 -8
  230. package/dist/src/reactjs/hooks/index.d.ts.map +0 -1
  231. package/dist/src/reactjs/hooks/index.js +0 -8
  232. package/dist/src/reactjs/hooks/index.js.map +0 -1
  233. package/dist/src/reactjs/hooks/useAuth.d.ts +0 -3
  234. package/dist/src/reactjs/hooks/useAuth.d.ts.map +0 -1
  235. package/dist/src/reactjs/hooks/useAuth.js +0 -12
  236. package/dist/src/reactjs/hooks/useAuth.js.map +0 -1
  237. package/dist/src/reactjs/hooks/useUser.d.ts +0 -4
  238. package/dist/src/reactjs/hooks/useUser.d.ts.map +0 -1
  239. package/dist/src/reactjs/hooks/useUser.js +0 -12
  240. package/dist/src/reactjs/hooks/useUser.js.map +0 -1
  241. package/dist/src/reactjs/index.d.ts +0 -6
  242. package/dist/src/reactjs/index.d.ts.map +0 -1
  243. package/dist/src/reactjs/index.js +0 -8
  244. package/dist/src/reactjs/index.js.map +0 -1
  245. package/dist/src/reactjs/providers/index.d.ts +0 -8
  246. package/dist/src/reactjs/providers/index.d.ts.map +0 -1
  247. package/dist/src/reactjs/providers/index.js +0 -7
  248. package/dist/src/reactjs/providers/index.js.map +0 -1
  249. package/dist/src/server/ServerAuthenticationResolver.d.ts +0 -18
  250. package/dist/src/server/ServerAuthenticationResolver.d.ts.map +0 -1
  251. package/dist/src/server/ServerAuthenticationResolver.js +0 -62
  252. package/dist/src/server/ServerAuthenticationResolver.js.map +0 -1
  253. package/dist/src/server/config.d.ts +0 -16
  254. package/dist/src/server/config.d.ts.map +0 -1
  255. package/dist/src/server/config.js +0 -2
  256. package/dist/src/server/config.js.map +0 -1
  257. package/dist/src/server/index.d.ts +0 -6
  258. package/dist/src/server/index.d.ts.map +0 -1
  259. package/dist/src/server/index.js +0 -5
  260. package/dist/src/server/index.js.map +0 -1
  261. package/dist/src/server/login.d.ts +0 -17
  262. package/dist/src/server/login.d.ts.map +0 -1
  263. package/dist/src/server/login.js +0 -37
  264. package/dist/src/server/login.js.map +0 -1
  265. package/dist/src/server/refresh.d.ts +0 -7
  266. package/dist/src/server/refresh.d.ts.map +0 -1
  267. package/dist/src/server/refresh.js +0 -13
  268. package/dist/src/server/refresh.js.map +0 -1
  269. package/dist/src/services/AuthenticationService.d.ts +0 -87
  270. package/dist/src/services/AuthenticationService.d.ts.map +0 -1
  271. package/dist/src/services/AuthenticationService.js +0 -222
  272. package/dist/src/services/AuthenticationService.js.map +0 -1
  273. package/dist/src/services/PKCE.d.ts +0 -20
  274. package/dist/src/services/PKCE.d.ts.map +0 -1
  275. package/dist/src/services/PKCE.js +0 -44
  276. package/dist/src/services/PKCE.js.map +0 -1
  277. package/dist/src/services/types.d.ts +0 -23
  278. package/dist/src/services/types.d.ts.map +0 -1
  279. package/dist/src/services/types.js +0 -7
  280. package/dist/src/services/types.js.map +0 -1
  281. package/dist/src/shared/components/CivicAuthIframe.d.ts +0 -8
  282. package/dist/src/shared/components/CivicAuthIframe.d.ts.map +0 -1
  283. package/dist/src/shared/components/CivicAuthIframe.js +0 -9
  284. package/dist/src/shared/components/CivicAuthIframe.js.map +0 -1
  285. package/dist/src/shared/components/CivicAuthIframeContainer.d.ts +0 -9
  286. package/dist/src/shared/components/CivicAuthIframeContainer.d.ts.map +0 -1
  287. package/dist/src/shared/components/CivicAuthIframeContainer.js +0 -130
  288. package/dist/src/shared/components/CivicAuthIframeContainer.js.map +0 -1
  289. package/dist/src/shared/components/CloseIcon.d.ts +0 -4
  290. package/dist/src/shared/components/CloseIcon.d.ts.map +0 -1
  291. package/dist/src/shared/components/CloseIcon.js +0 -6
  292. package/dist/src/shared/components/CloseIcon.js.map +0 -1
  293. package/dist/src/shared/components/LoadingIcon.d.ts +0 -4
  294. package/dist/src/shared/components/LoadingIcon.d.ts.map +0 -1
  295. package/dist/src/shared/components/LoadingIcon.js +0 -24
  296. package/dist/src/shared/components/LoadingIcon.js.map +0 -1
  297. package/dist/src/shared/hooks/index.d.ts +0 -5
  298. package/dist/src/shared/hooks/index.d.ts.map +0 -1
  299. package/dist/src/shared/hooks/index.js +0 -5
  300. package/dist/src/shared/hooks/index.js.map +0 -1
  301. package/dist/src/shared/hooks/useAuth.d.ts +0 -3
  302. package/dist/src/shared/hooks/useAuth.d.ts.map +0 -1
  303. package/dist/src/shared/hooks/useAuth.js +0 -12
  304. package/dist/src/shared/hooks/useAuth.js.map +0 -1
  305. package/dist/src/shared/hooks/useConfig.d.ts +0 -3
  306. package/dist/src/shared/hooks/useConfig.d.ts.map +0 -1
  307. package/dist/src/shared/hooks/useConfig.js +0 -13
  308. package/dist/src/shared/hooks/useConfig.js.map +0 -1
  309. package/dist/src/shared/hooks/useIframe.d.ts +0 -3
  310. package/dist/src/shared/hooks/useIframe.d.ts.map +0 -1
  311. package/dist/src/shared/hooks/useIframe.js +0 -13
  312. package/dist/src/shared/hooks/useIframe.js.map +0 -1
  313. package/dist/src/shared/hooks/useSession.d.ts +0 -3
  314. package/dist/src/shared/hooks/useSession.d.ts.map +0 -1
  315. package/dist/src/shared/hooks/useSession.js +0 -13
  316. package/dist/src/shared/hooks/useSession.js.map +0 -1
  317. package/dist/src/shared/hooks/useToken.d.ts +0 -3
  318. package/dist/src/shared/hooks/useToken.d.ts.map +0 -1
  319. package/dist/src/shared/hooks/useToken.js +0 -12
  320. package/dist/src/shared/hooks/useToken.js.map +0 -1
  321. package/dist/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +0 -1
  322. package/dist/src/shared/lib/GenericAuthenticationRefresher.js.map +0 -1
  323. package/dist/src/shared/lib/UserSession.d.ts +0 -12
  324. package/dist/src/shared/lib/UserSession.d.ts.map +0 -1
  325. package/dist/src/shared/lib/UserSession.js +0 -20
  326. package/dist/src/shared/lib/UserSession.js.map +0 -1
  327. package/dist/src/shared/lib/session.d.ts +0 -3
  328. package/dist/src/shared/lib/session.d.ts.map +0 -1
  329. package/dist/src/shared/lib/session.js +0 -10
  330. package/dist/src/shared/lib/session.js.map +0 -1
  331. package/dist/src/shared/lib/storage.d.ts +0 -25
  332. package/dist/src/shared/lib/storage.d.ts.map +0 -1
  333. package/dist/src/shared/lib/storage.js +0 -17
  334. package/dist/src/shared/lib/storage.js.map +0 -1
  335. package/dist/src/shared/lib/types.d.ts +0 -22
  336. package/dist/src/shared/lib/types.d.ts.map +0 -1
  337. package/dist/src/shared/lib/types.js +0 -16
  338. package/dist/src/shared/lib/types.js.map +0 -1
  339. package/dist/src/shared/lib/util.d.ts.map +0 -1
  340. package/dist/src/shared/lib/util.js +0 -126
  341. package/dist/src/shared/lib/util.js.map +0 -1
  342. package/dist/src/shared/providers/AuthContext.d.ts +0 -10
  343. package/dist/src/shared/providers/AuthContext.d.ts.map +0 -1
  344. package/dist/src/shared/providers/AuthContext.js +0 -3
  345. package/dist/src/shared/providers/AuthContext.js.map +0 -1
  346. package/dist/src/shared/providers/AuthProvider.d.ts.map +0 -1
  347. package/dist/src/shared/providers/AuthProvider.js.map +0 -1
  348. package/dist/src/shared/providers/CivicAuthProvider.d.ts.map +0 -1
  349. package/dist/src/shared/providers/CivicAuthProvider.js +0 -15
  350. package/dist/src/shared/providers/CivicAuthProvider.js.map +0 -1
  351. package/dist/src/shared/providers/ConfigProvider.d.ts +0 -21
  352. package/dist/src/shared/providers/ConfigProvider.d.ts.map +0 -1
  353. package/dist/src/shared/providers/ConfigProvider.js +0 -19
  354. package/dist/src/shared/providers/ConfigProvider.js.map +0 -1
  355. package/dist/src/shared/providers/IframeProvider.d.ts +0 -16
  356. package/dist/src/shared/providers/IframeProvider.d.ts.map +0 -1
  357. package/dist/src/shared/providers/IframeProvider.js +0 -11
  358. package/dist/src/shared/providers/IframeProvider.js.map +0 -1
  359. package/dist/src/shared/providers/SessionProvider.d.ts +0 -13
  360. package/dist/src/shared/providers/SessionProvider.d.ts.map +0 -1
  361. package/dist/src/shared/providers/SessionProvider.js +0 -13
  362. package/dist/src/shared/providers/SessionProvider.js.map +0 -1
  363. package/dist/src/shared/providers/TokenProvider.d.ts +0 -18
  364. package/dist/src/shared/providers/TokenProvider.d.ts.map +0 -1
  365. package/dist/src/shared/providers/TokenProvider.js +0 -53
  366. package/dist/src/shared/providers/TokenProvider.js.map +0 -1
  367. package/dist/src/shared/providers/UserProvider.d.ts.map +0 -1
  368. package/dist/src/shared/providers/UserProvider.js +0 -38
  369. package/dist/src/shared/providers/UserProvider.js.map +0 -1
  370. package/dist/src/types.d.ts +0 -146
  371. package/dist/src/types.d.ts.map +0 -1
  372. package/dist/src/types.js +0 -2
  373. package/dist/src/types.js.map +0 -1
  374. package/dist/src/utils.d.ts +0 -15
  375. package/dist/src/utils.d.ts.map +0 -1
  376. package/dist/src/utils.js +0 -43
  377. package/dist/src/utils.js.map +0 -1
  378. package/dist/storage-ANmRwpZ3.d.ts +0 -25
  379. package/dist/storage-B2eAQNdv.d.ts +0 -25
  380. package/dist/storage-BJPUpxhm.d.mts +0 -25
  381. package/dist/storage-BJyqsZwC.d.mts +0 -25
  382. package/dist/test/integration/sdk.test.d.ts +0 -2
  383. package/dist/test/integration/sdk.test.d.ts.map +0 -1
  384. package/dist/test/integration/sdk.test.js +0 -183
  385. package/dist/test/integration/sdk.test.js.map +0 -1
  386. package/dist/test/support/fixtures.d.ts +0 -26
  387. package/dist/test/support/fixtures.d.ts.map +0 -1
  388. package/dist/test/support/fixtures.js +0 -55
  389. package/dist/test/support/fixtures.js.map +0 -1
  390. package/dist/test/support/tokens.json +0 -26
  391. package/dist/test/unit/lib/oauth.test.d.ts +0 -2
  392. package/dist/test/unit/lib/oauth.test.d.ts.map +0 -1
  393. package/dist/test/unit/lib/oauth.test.js +0 -55
  394. package/dist/test/unit/lib/oauth.test.js.map +0 -1
  395. package/dist/test/unit/logger.test.d.ts +0 -2
  396. package/dist/test/unit/logger.test.d.ts.map +0 -1
  397. package/dist/test/unit/logger.test.js +0 -141
  398. package/dist/test/unit/logger.test.js.map +0 -1
  399. package/dist/test/unit/nextjs/NextAuthProvider.test.d.ts +0 -2
  400. package/dist/test/unit/nextjs/NextAuthProvider.test.d.ts.map +0 -1
  401. package/dist/test/unit/nextjs/NextAuthProvider.test.js +0 -29
  402. package/dist/test/unit/nextjs/NextAuthProvider.test.js.map +0 -1
  403. package/dist/test/unit/nextjs/config.test.d.ts +0 -2
  404. package/dist/test/unit/nextjs/config.test.d.ts.map +0 -1
  405. package/dist/test/unit/nextjs/config.test.js +0 -189
  406. package/dist/test/unit/nextjs/config.test.js.map +0 -1
  407. package/dist/test/unit/nextjs/getUser.test.d.ts +0 -2
  408. package/dist/test/unit/nextjs/getUser.test.d.ts.map +0 -1
  409. package/dist/test/unit/nextjs/getUser.test.js +0 -36
  410. package/dist/test/unit/nextjs/getUser.test.js.map +0 -1
  411. package/dist/test/unit/nextjs/middleware.test.d.ts +0 -2
  412. package/dist/test/unit/nextjs/middleware.test.d.ts.map +0 -1
  413. package/dist/test/unit/nextjs/middleware.test.js +0 -113
  414. package/dist/test/unit/nextjs/middleware.test.js.map +0 -1
  415. package/dist/test/unit/nextjs/utils.test.d.ts +0 -2
  416. package/dist/test/unit/nextjs/utils.test.d.ts.map +0 -1
  417. package/dist/test/unit/nextjs/utils.test.js +0 -13
  418. package/dist/test/unit/nextjs/utils.test.js.map +0 -1
  419. package/dist/test/unit/publicApi/apiSnapshot.test.d.ts +0 -2
  420. package/dist/test/unit/publicApi/apiSnapshot.test.d.ts.map +0 -1
  421. package/dist/test/unit/publicApi/apiSnapshot.test.js +0 -10
  422. package/dist/test/unit/publicApi/apiSnapshot.test.js.map +0 -1
  423. package/dist/test/unit/react/components/SignInButton.test.d.ts +0 -2
  424. package/dist/test/unit/react/components/SignInButton.test.d.ts.map +0 -1
  425. package/dist/test/unit/react/components/SignInButton.test.js +0 -31
  426. package/dist/test/unit/react/components/SignInButton.test.js.map +0 -1
  427. package/dist/test/unit/react/components/SignOutButton.test.d.ts +0 -2
  428. package/dist/test/unit/react/components/SignOutButton.test.d.ts.map +0 -1
  429. package/dist/test/unit/react/components/SignOutButton.test.js +0 -30
  430. package/dist/test/unit/react/components/SignOutButton.test.js.map +0 -1
  431. package/dist/test/unit/server/login.test.d.ts +0 -2
  432. package/dist/test/unit/server/login.test.d.ts.map +0 -1
  433. package/dist/test/unit/server/login.test.js +0 -127
  434. package/dist/test/unit/server/login.test.js.map +0 -1
  435. package/dist/test/unit/server/session.test.d.ts +0 -2
  436. package/dist/test/unit/server/session.test.d.ts.map +0 -1
  437. package/dist/test/unit/server/session.test.js +0 -41
  438. package/dist/test/unit/server/session.test.js.map +0 -1
  439. package/dist/test/unit/services/AuthenticationService.test.d.ts +0 -2
  440. package/dist/test/unit/services/AuthenticationService.test.d.ts.map +0 -1
  441. package/dist/test/unit/services/AuthenticationService.test.js +0 -104
  442. package/dist/test/unit/services/AuthenticationService.test.js.map +0 -1
  443. package/dist/test/unit/services/ServerAuthenticationResolver.test.d.ts +0 -2
  444. package/dist/test/unit/services/ServerAuthenticationResolver.test.d.ts.map +0 -1
  445. package/dist/test/unit/services/ServerAuthenticationResolver.test.js +0 -74
  446. package/dist/test/unit/services/ServerAuthenticationResolver.test.js.map +0 -1
  447. package/dist/test/unit/shared/GenericAuthenticationRefresher.test.d.ts +0 -2
  448. package/dist/test/unit/shared/GenericAuthenticationRefresher.test.d.ts.map +0 -1
  449. package/dist/test/unit/shared/GenericAuthenticationRefresher.test.js +0 -61
  450. package/dist/test/unit/shared/GenericAuthenticationRefresher.test.js.map +0 -1
  451. package/dist/test/unit/shared/UserSession.test.d.ts +0 -2
  452. package/dist/test/unit/shared/UserSession.test.d.ts.map +0 -1
  453. package/dist/test/unit/shared/UserSession.test.js +0 -37
  454. package/dist/test/unit/shared/UserSession.test.js.map +0 -1
  455. package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.d.ts +0 -2
  456. package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.d.ts.map +0 -1
  457. package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.js +0 -120
  458. package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.js.map +0 -1
  459. package/dist/test/unit/shared/storage.test.d.ts +0 -2
  460. package/dist/test/unit/shared/storage.test.d.ts.map +0 -1
  461. package/dist/test/unit/shared/storage.test.js +0 -53
  462. package/dist/test/unit/shared/storage.test.js.map +0 -1
  463. package/dist/test/unit/utils.test.d.ts +0 -2
  464. package/dist/test/unit/utils.test.d.ts.map +0 -1
  465. package/dist/test/unit/utils.test.js +0 -40
  466. package/dist/test/unit/utils.test.js.map +0 -1
  467. package/dist/types-Bqm9OCZN.d.mts +0 -22
  468. package/dist/types-Bqm9OCZN.d.ts +0 -22
  469. package/dist/types-BxAubCqO.d.mts +0 -58
  470. package/dist/types-BxAubCqO.d.ts +0 -58
  471. package/dist/types-DOfl9w7j.d.mts +0 -23
  472. package/dist/types-DOfl9w7j.d.ts +0 -23
  473. package/dist/types-HdCjGldB.d.mts +0 -58
  474. package/dist/types-HdCjGldB.d.ts +0 -58
  475. package/dist/vitest.config.d.ts +0 -3
  476. package/dist/vitest.config.d.ts.map +0 -1
  477. package/dist/vitest.config.js +0 -40
  478. package/dist/vitest.config.js.map +0 -1
@@ -1,24 +1,16 @@
1
1
 
2
2
  
3
- > @civic/auth@0.0.1-beta.28 test /Users/patrick/Code/civic-auth/packages/civic-auth-client
3
+ > @civic/auth@0.0.1-beta.28-8 test /Users/kevincolgan/code/civic-auth/packages/civic-auth-client
4
4
  > vitest "--run" "--coverage"
5
5
 
6
6
 
7
-  RUN  v2.1.2 /Users/patrick/Code/civic-auth/packages/civic-auth-client
7
+  RUN  v2.1.2 /Users/kevincolgan/code/civic-auth/packages/civic-auth-client
8
8
   Coverage enabled with v8
9
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
10
+ [?25l · test/unit/logger.test.ts (11)
11
+ [?25l · test/unit/nextjs/config.test.ts (10)
12
+ · test/unit/logger.test.ts (11)
13
+ stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > authMiddleware > should allow access when token is present
22
14
  matching { pattern: '/*', pathname: '/protected', match: true }
23
15
  → Auth check passed
24
16
 
@@ -41,10 +33,6 @@ matching { pattern: '/*', pathname: '/protected', match: [3
41
33
  matching { pattern: '/protected/**', pathname: '/public', match: false }
42
34
  → Skipping auth check - path not in include patterns
43
35
 
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
36
  stdout | test/unit/nextjs/middleware.test.ts > Auth Middleware > path matching > should respect exclude patterns
49
37
  matching {
50
38
  pattern: '/protected/**',
@@ -59,31 +47,102 @@ matching {
59
47
  → Skipping auth check - path in exclude patterns
60
48
 
61
49
  [?25l · test/unit/nextjs/config.test.ts (10)
50
+ ✓ test/unit/logger.test.ts (11)
62
51
  · 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)
52
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
53
+ ❯ nextjs/config (10)
54
+ ❯ resolveAuthConfig (7)
55
+ ✓ should throw an error if clientId is not provided
56
+ ✓ should use default values when no config is provided
57
+ ✓ should override default values with provided config
58
+ ✓ should use environment variables if set
59
+ ✓ should prioritize provided config over environment variables
60
+ ✓ should merge cookie configurations correctly
61
+ ⠙ should set secure to true in the default cookie configs if NODE_ENV is not development
62
+ · createCivicAuthPlugin (3)
63
+ ✓ test/unit/logger.test.ts (11)
66
64
  · 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)
65
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
66
+ ❯ nextjs/config (10)
67
+ ❯ resolveAuthConfig (7)
68
+ ✓ should throw an error if clientId is not provided
69
+ ✓ should use default values when no config is provided
70
+ ✓ should override default values with provided config
71
+ ✓ should use environment variables if set
72
+ ✓ should prioritize provided config over environment variables
73
+ ✓ should merge cookie configurations correctly
74
+ ⠹ should set secure to true in the default cookie configs if NODE_ENV is not development
75
+ · createCivicAuthPlugin (3)
76
+ ✓ test/unit/logger.test.ts (11)
77
+ · test/unit/nextjs/middleware.test.ts (7)
78
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
79
+ ❯ nextjs/config (10)
80
+ ❯ resolveAuthConfig (7)
81
+ ✓ should throw an error if clientId is not provided
82
+ ✓ should use default values when no config is provided
83
+ ✓ should override default values with provided config
84
+ ✓ should use environment variables if set
85
+ ✓ should prioritize provided config over environment variables
86
+ ✓ should merge cookie configurations correctly
87
+ ⠸ should set secure to true in the default cookie configs if NODE_ENV is not development
88
+ · createCivicAuthPlugin (3)
89
+ ✓ test/unit/logger.test.ts (11)
70
90
  · test/unit/nextjs/middleware.test.ts (7)
91
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
92
+ ❯ nextjs/config (10)
93
+ ❯ resolveAuthConfig (7)
94
+ ✓ should throw an error if clientId is not provided
95
+ ✓ should use default values when no config is provided
96
+ ✓ should override default values with provided config
97
+ ✓ should use environment variables if set
98
+ ✓ should prioritize provided config over environment variables
99
+ ✓ should merge cookie configurations correctly
100
+ ⠼ should set secure to true in the default cookie configs if NODE_ENV is not development
101
+ · createCivicAuthPlugin (3)
102
+ ✓ test/unit/logger.test.ts (11)
103
+ · test/unit/nextjs/middleware.test.ts (7)
104
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
105
+ ❯ nextjs/config (10)
106
+ ❯ resolveAuthConfig (7)
107
+ ✓ should throw an error if clientId is not provided
108
+ ✓ should use default values when no config is provided
109
+ ✓ should override default values with provided config
110
+ ✓ should use environment variables if set
111
+ ✓ should prioritize provided config over environment variables
112
+ ✓ should merge cookie configurations correctly
113
+ ⠴ should set secure to true in the default cookie configs if NODE_ENV is not development
114
+ · createCivicAuthPlugin (3)
115
+ ✓ test/unit/logger.test.ts (11)
116
+ ✓ test/unit/nextjs/middleware.test.ts (7)
117
+ [?25l ❯ test/unit/nextjs/config.test.ts (10)
118
+ ❯ nextjs/config (10)
119
+ ❯ resolveAuthConfig (7)
120
+ ✓ should throw an error if clientId is not provided
121
+ ✓ should use default values when no config is provided
122
+ ✓ should override default values with provided config
123
+ ✓ should use environment variables if set
124
+ ✓ should prioritize provided config over environment variables
125
+ ✓ should merge cookie configurations correctly
126
+ ⠦ should set secure to true in the default cookie configs if NODE_ENV is not development
127
+ · createCivicAuthPlugin (3)
128
+ ✓ test/unit/logger.test.ts (11)
129
+ ✓ test/unit/nextjs/middleware.test.ts (7)
130
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
131
+ ✓ test/unit/logger.test.ts (11)
132
+ ✓ test/unit/nextjs/middleware.test.ts (7)
133
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/unit/nextjs/config.test.ts (10)
134
+ ✓ test/unit/logger.test.ts (11)
135
+ ✓ test/unit/nextjs/middleware.test.ts (7)
71
136
  · test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
72
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
73
- · test/unit/logger.test.ts (11)
137
+ [?25l[?25l[?25l[?25l[?25l ✓ test/unit/nextjs/config.test.ts (10)
138
+ ✓ test/unit/logger.test.ts (11)
74
139
  ✓ test/unit/nextjs/middleware.test.ts (7)
75
140
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
76
141
  ❯ CivicAuthIframeContainer (3)
77
142
  ⠙ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
78
143
  · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
79
144
  · 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)
145
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
87
146
  ✓ test/unit/logger.test.ts (11)
88
147
  ✓ test/unit/nextjs/middleware.test.ts (7)
89
148
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
@@ -93,384 +152,49 @@ sameDomainCodeExchangeRequired, calling callback URL again...
93
152
  · does not call onClose if closeOnRedirect is false
94
153
  [?25l ✓ test/unit/nextjs/config.test.ts (10)
95
154
  ✓ test/unit/logger.test.ts (11)
155
+ · test/unit/services/AuthenticationService.test.ts (6)
96
156
  ✓ test/unit/nextjs/middleware.test.ts (7)
97
157
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
98
158
  ❯ CivicAuthIframeContainer (3)
99
159
  ⠸ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
100
160
  · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
101
161
  · does not call onClose if closeOnRedirect is false
102
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
162
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
163
+ · test/unit/server/login.test.ts (6)
103
164
  ✓ test/unit/logger.test.ts (11)
165
+ · test/unit/services/AuthenticationService.test.ts (6)
104
166
  ✓ test/unit/nextjs/middleware.test.ts (7)
105
167
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
106
168
  ❯ CivicAuthIframeContainer (3)
107
169
  ⠼ triggers a fetch request when 'sameDomainCodeExchangeRequired' is in the iframe body
108
170
  · sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
109
171
  · 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
172
  · 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
173
+ stderr | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationInitiator > should generate a login URL
261
174
  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)
175
+ at module.exports (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/browser/not-implemented.js:9:17)
176
+ at navigateFetch (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:77:3)
177
+ at exports.navigate (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/navigation.js:55:3)
178
+ at LocationImpl._locationObjectNavigate (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:31:5)
179
+ at LocationImpl._locationObjectSetterNavigate (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:25:17)
180
+ at LocationImpl.set href [as href] (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/living/window/Location-impl.js:47:10)
181
+ at Location.set href [as href] (/Users/kevincolgan/code/civic-auth/node_modules/jsdom/lib/jsdom/living/generated/Location.js:125:37)
182
+ at BrowserAuthenticationInitiator.signIn (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:112:23)
270
183
  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
- }
184
+ at /Users/kevincolgan/code/civic-auth/packages/civic-auth-client/test/unit/services/AuthenticationService.test.ts:54:19 undefined
385
185
 
386
186
  stderr | test/unit/services/AuthenticationService.test.ts > Authentication Services > BrowserAuthenticationService > should exchange auth code for tokens and store them
387
187
  Failed to parse displayMode from state: mockState DOMException [InvalidCharacterError]: The string to be decoded is not correctly encoded.
388
188
   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)
189
+ at Module.displayModeFromState (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
190
+ at BrowserAuthenticationService.tokenExchange (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:256:31)
391
191
   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
- }
192
+ at /Users/kevincolgan/code/civic-auth/packages/civic-auth-client/test/unit/services/AuthenticationService.test.ts:128:22
193
+ at file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:533:5
194
+ at runTest (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:986:11)
195
+ at runSuite (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
196
+ at runSuite (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
197
+ at runSuite (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
474
198
 
475
199
  [?25l ✓ test/unit/nextjs/config.test.ts (10)
476
200
  · test/unit/server/login.test.ts (6)
@@ -480,25 +204,11 @@ BrowserAuthenticationInitiator constructor {
480
204
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
481
205
  ❯ CivicAuthIframeContainer (3)
482
206
  ✓ 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
207
+ ⠙ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
208
+ · does not call onClose if closeOnRedirect is false
498
209
  · test/unit/services/ServerAuthenticationResolver.test.ts (5)
499
210
  · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
500
- · test/unit/lib/oauth.test.ts (6)
501
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
211
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
502
212
  · test/unit/server/login.test.ts (6)
503
213
  ✓ test/unit/logger.test.ts (11)
504
214
  · test/unit/services/AuthenticationService.test.ts (6)
@@ -506,12 +216,11 @@ BrowserAuthenticationInitiator constructor {
506
216
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
507
217
  ❯ CivicAuthIframeContainer (3)
508
218
  ✓ 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
219
+ ⠹ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
220
+ · does not call onClose if closeOnRedirect is false
511
221
  · test/unit/services/ServerAuthenticationResolver.test.ts (5)
512
222
  · test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
513
- ✓ test/unit/lib/oauth.test.ts (6)
514
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
223
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
515
224
  · test/unit/server/login.test.ts (6)
516
225
  ✓ test/unit/logger.test.ts (11)
517
226
  · test/unit/services/AuthenticationService.test.ts (6)
@@ -519,116 +228,52 @@ BrowserAuthenticationInitiator constructor {
519
228
  ❯ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
520
229
  ❯ CivicAuthIframeContainer (3)
521
230
  ✓ 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
231
+ ⠸ sets auth response URL when no 'sameDomainCodeExchangeRequired' in iframe body
232
+ · does not call onClose if closeOnRedirect is false
524
233
  · test/unit/services/ServerAuthenticationResolver.test.ts (5)
525
234
  · 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)
235
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
541
236
  · test/unit/server/login.test.ts (6)
542
237
  ✓ test/unit/logger.test.ts (11)
543
238
  ✓ test/unit/services/AuthenticationService.test.ts (6)
544
239
  ✓ 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
240
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
589
241
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
590
242
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
591
- ✓ test/unit/lib/oauth.test.ts (6)
592
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
243
+ [?25l ✓ test/unit/nextjs/config.test.ts (10)
593
244
  ✓ test/unit/server/login.test.ts (6)
594
245
  ✓ test/unit/logger.test.ts (11)
595
246
  ✓ test/unit/services/AuthenticationService.test.ts (6)
596
247
  ✓ 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
248
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
602
249
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
603
250
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
604
- ✓ test/unit/lib/oauth.test.ts (6)
605
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
251
+ [?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)
252
+ ✓ test/unit/nextjs/config.test.ts (10)
606
253
  ✓ test/unit/server/login.test.ts (6)
607
254
  ✓ test/unit/logger.test.ts (11)
608
255
  ✓ test/unit/services/AuthenticationService.test.ts (6)
609
256
  ✓ 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
257
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
615
258
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
616
259
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
617
- ✓ test/unit/lib/oauth.test.ts (6)
618
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
260
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ❯ test/integration/sdk.test.tsx (2)
261
+ ❯ OAuth login (2)
262
+ ⠙ should set the correct auth url for login with redirect
263
+ · should initiate code exchange, validate tokens, and derive user from ID token
264
+ ✓ test/unit/nextjs/config.test.ts (10)
619
265
  ✓ test/unit/server/login.test.ts (6)
620
266
  ✓ test/unit/logger.test.ts (11)
621
267
  ✓ test/unit/services/AuthenticationService.test.ts (6)
622
268
  ✓ 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
269
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
628
270
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
629
271
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
630
- ✓ test/unit/lib/oauth.test.ts (6)
631
- [?25l ✓ test/unit/nextjs/config.test.ts (10)
272
+ [?25l ❯ test/integration/sdk.test.tsx (2)
273
+ ❯ OAuth login (2)
274
+ ⠹ should set the correct auth url for login with redirect
275
+ · should initiate code exchange, validate tokens, and derive user from ID token
276
+ ✓ test/unit/nextjs/config.test.ts (10)
632
277
  ✓ test/unit/server/login.test.ts (6)
633
278
  ✓ test/unit/logger.test.ts (11)
634
279
  ✓ test/unit/services/AuthenticationService.test.ts (6)
@@ -636,8 +281,10 @@ BrowserAuthenticationInitiator constructor {
636
281
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
637
282
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
638
283
  ✓ 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)
284
+ [?25l ❯ test/integration/sdk.test.tsx (2)
285
+ ❯ OAuth login (2)
286
+ ⠸ should set the correct auth url for login with redirect
287
+ · should initiate code exchange, validate tokens, and derive user from ID token
641
288
  ✓ test/unit/nextjs/config.test.ts (10)
642
289
  ✓ test/unit/server/login.test.ts (6)
643
290
  ✓ test/unit/logger.test.ts (11)
@@ -646,10 +293,9 @@ BrowserAuthenticationInitiator constructor {
646
293
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
647
294
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
648
295
  ✓ 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)
296
+ [?25l ❯ test/integration/sdk.test.tsx (2)
651
297
  ❯ OAuth login (2)
652
- ⠙ should set the correct auth url for login with redirect
298
+ ⠼ should set the correct auth url for login with redirect
653
299
  · should initiate code exchange, validate tokens, and derive user from ID token
654
300
  ✓ test/unit/nextjs/config.test.ts (10)
655
301
  ✓ test/unit/server/login.test.ts (6)
@@ -659,75 +305,9 @@ BrowserAuthenticationInitiator constructor {
659
305
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
660
306
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
661
307
  ✓ 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)
308
+ [?25l ❯ test/integration/sdk.test.tsx (2)
729
309
  ❯ OAuth login (2)
730
- ⠹ should set the correct auth url for login with redirect
310
+ ⠴ should set the correct auth url for login with redirect
731
311
  · should initiate code exchange, validate tokens, and derive user from ID token
732
312
  ✓ test/unit/nextjs/config.test.ts (10)
733
313
  ✓ test/unit/server/login.test.ts (6)
@@ -737,10 +317,9 @@ Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_i
737
317
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
738
318
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
739
319
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
740
- ✓ test/unit/lib/oauth.test.ts (6)
741
- [?25l ❯ test/integration/sdk.test.tsx (2)
320
+ [?25l ❯ test/integration/sdk.test.tsx (2)
742
321
  ❯ OAuth login (2)
743
- ⠸ should set the correct auth url for login with redirect
322
+ ⠦ should set the correct auth url for login with redirect
744
323
  · should initiate code exchange, validate tokens, and derive user from ID token
745
324
  ✓ test/unit/nextjs/config.test.ts (10)
746
325
  ✓ test/unit/server/login.test.ts (6)
@@ -750,10 +329,9 @@ Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_i
750
329
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
751
330
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
752
331
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
753
- ✓ test/unit/lib/oauth.test.ts (6)
754
- [?25l ❯ test/integration/sdk.test.tsx (2)
332
+ [?25l ❯ test/integration/sdk.test.tsx (2)
755
333
  ❯ OAuth login (2)
756
- ⠼ should set the correct auth url for login with redirect
334
+ ⠧ should set the correct auth url for login with redirect
757
335
  · should initiate code exchange, validate tokens, and derive user from ID token
758
336
  ✓ test/unit/nextjs/config.test.ts (10)
759
337
  ✓ test/unit/server/login.test.ts (6)
@@ -763,10 +341,9 @@ Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_i
763
341
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
764
342
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
765
343
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
766
- ✓ test/unit/lib/oauth.test.ts (6)
767
- [?25l ❯ test/integration/sdk.test.tsx (2)
344
+ [?25l ❯ test/integration/sdk.test.tsx (2)
768
345
  ❯ OAuth login (2)
769
- ⠴ should set the correct auth url for login with redirect
346
+ ⠇ should set the correct auth url for login with redirect
770
347
  · should initiate code exchange, validate tokens, and derive user from ID token
771
348
  ✓ test/unit/nextjs/config.test.ts (10)
772
349
  ✓ test/unit/server/login.test.ts (6)
@@ -776,10 +353,9 @@ Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_i
776
353
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
777
354
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
778
355
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
779
- ✓ test/unit/lib/oauth.test.ts (6)
780
- [?25l ❯ test/integration/sdk.test.tsx (2)
356
+ [?25l ❯ test/integration/sdk.test.tsx (2)
781
357
  ❯ OAuth login (2)
782
- ✓ should set the correct auth url for login with redirect 341ms
358
+ ✓ should set the correct auth url for login with redirect 422ms
783
359
  ⠙ should initiate code exchange, validate tokens, and derive user from ID token
784
360
  ✓ test/unit/nextjs/config.test.ts (10)
785
361
  ✓ test/unit/server/login.test.ts (6)
@@ -789,45 +365,17 @@ Generated OAuth URL http://localhost:3001/oauth/auth?response_type=code&client_i
789
365
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
790
366
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
791
367
  ✓ 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
368
+ stderr | test/integration/sdk.test.tsx > OAuth login > should initiate code exchange, validate tokens, and derive user from ID token
821
369
  Failed to parse displayMode from state: mock-state DOMException [InvalidCharacterError]: Invalid character
822
370
   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)
371
+ at Module.displayModeFromState (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
372
+ at BrowserAuthenticationService.tokenExchange (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/services/AuthenticationService.ts:256:31)
373
+ at queryFn (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:185:11)
826
374
  window.history.replaceState failed DOMException {}
827
375
 
828
376
  [?25l ❯ test/integration/sdk.test.tsx (2)
829
377
  ❯ OAuth login (2)
830
- ✓ should set the correct auth url for login with redirect 341ms
378
+ ✓ should set the correct auth url for login with redirect 422ms
831
379
  ⠹ should initiate code exchange, validate tokens, and derive user from ID token
832
380
  ✓ test/unit/nextjs/config.test.ts (10)
833
381
  ✓ test/unit/server/login.test.ts (6)
@@ -837,10 +385,9 @@ window.history.replaceState failed DOMException {}
837
385
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
838
386
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
839
387
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
840
- ✓ test/unit/lib/oauth.test.ts (6)
841
- [?25l ❯ test/integration/sdk.test.tsx (2)
388
+ [?25l ❯ test/integration/sdk.test.tsx (2)
842
389
  ❯ OAuth login (2)
843
- ✓ should set the correct auth url for login with redirect 341ms
390
+ ✓ should set the correct auth url for login with redirect 422ms
844
391
  ⠸ should initiate code exchange, validate tokens, and derive user from ID token
845
392
  ✓ test/unit/nextjs/config.test.ts (10)
846
393
  ✓ test/unit/server/login.test.ts (6)
@@ -850,10 +397,9 @@ window.history.replaceState failed DOMException {}
850
397
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
851
398
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
852
399
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
853
- ✓ test/unit/lib/oauth.test.ts (6)
854
- [?25l ❯ test/integration/sdk.test.tsx (2)
400
+ [?25l ❯ test/integration/sdk.test.tsx (2)
855
401
  ❯ OAuth login (2)
856
- ✓ should set the correct auth url for login with redirect 341ms
402
+ ✓ should set the correct auth url for login with redirect 422ms
857
403
  ⠼ should initiate code exchange, validate tokens, and derive user from ID token
858
404
  ✓ test/unit/nextjs/config.test.ts (10)
859
405
  ✓ test/unit/server/login.test.ts (6)
@@ -863,10 +409,9 @@ window.history.replaceState failed DOMException {}
863
409
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
864
410
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
865
411
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
866
- ✓ test/unit/lib/oauth.test.ts (6)
867
- [?25l ❯ test/integration/sdk.test.tsx (2)
412
+ [?25l ❯ test/integration/sdk.test.tsx (2)
868
413
  ❯ OAuth login (2)
869
- ✓ should set the correct auth url for login with redirect 341ms
414
+ ✓ should set the correct auth url for login with redirect 422ms
870
415
  ⠴ should initiate code exchange, validate tokens, and derive user from ID token
871
416
  ✓ test/unit/nextjs/config.test.ts (10)
872
417
  ✓ test/unit/server/login.test.ts (6)
@@ -876,10 +421,9 @@ window.history.replaceState failed DOMException {}
876
421
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
877
422
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
878
423
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
879
- ✓ test/unit/lib/oauth.test.ts (6)
880
- [?25l ❯ test/integration/sdk.test.tsx (2)
424
+ [?25l ❯ test/integration/sdk.test.tsx (2)
881
425
  ❯ OAuth login (2)
882
- ✓ should set the correct auth url for login with redirect 341ms
426
+ ✓ should set the correct auth url for login with redirect 422ms
883
427
  ⠦ should initiate code exchange, validate tokens, and derive user from ID token
884
428
  ✓ test/unit/nextjs/config.test.ts (10)
885
429
  ✓ test/unit/server/login.test.ts (6)
@@ -889,10 +433,11 @@ window.history.replaceState failed DOMException {}
889
433
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
890
434
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
891
435
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
892
- ✓ test/unit/lib/oauth.test.ts (6)
893
- [?25l ❯ test/integration/sdk.test.tsx (2)
436
+ · test/unit/lib/oauth.test.ts (6)
437
+ · test/unit/shared/storage.test.ts (3)
438
+ [?25l ❯ test/integration/sdk.test.tsx (2)
894
439
  ❯ OAuth login (2)
895
- ✓ should set the correct auth url for login with redirect 341ms
440
+ ✓ should set the correct auth url for login with redirect 422ms
896
441
  ⠧ should initiate code exchange, validate tokens, and derive user from ID token
897
442
  ✓ test/unit/nextjs/config.test.ts (10)
898
443
  ✓ test/unit/server/login.test.ts (6)
@@ -902,10 +447,11 @@ window.history.replaceState failed DOMException {}
902
447
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
903
448
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
904
449
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
905
- ✓ test/unit/lib/oauth.test.ts (6)
906
- [?25l ❯ test/integration/sdk.test.tsx (2)
450
+ · test/unit/lib/oauth.test.ts (6)
451
+ · test/unit/shared/storage.test.ts (3)
452
+ [?25l ❯ test/integration/sdk.test.tsx (2)
907
453
  ❯ OAuth login (2)
908
- ✓ should set the correct auth url for login with redirect 341ms
454
+ ✓ should set the correct auth url for login with redirect 422ms
909
455
  ⠇ should initiate code exchange, validate tokens, and derive user from ID token
910
456
  ✓ test/unit/nextjs/config.test.ts (10)
911
457
  ✓ test/unit/server/login.test.ts (6)
@@ -915,10 +461,11 @@ window.history.replaceState failed DOMException {}
915
461
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
916
462
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
917
463
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
918
- ✓ test/unit/lib/oauth.test.ts (6)
919
- [?25l ❯ test/integration/sdk.test.tsx (2)
464
+ · test/unit/lib/oauth.test.ts (6)
465
+ · test/unit/shared/storage.test.ts (3)
466
+ [?25l ❯ test/integration/sdk.test.tsx (2)
920
467
  ❯ OAuth login (2)
921
- ✓ should set the correct auth url for login with redirect 341ms
468
+ ✓ should set the correct auth url for login with redirect 422ms
922
469
  ⠏ should initiate code exchange, validate tokens, and derive user from ID token
923
470
  ✓ test/unit/nextjs/config.test.ts (10)
924
471
  ✓ test/unit/server/login.test.ts (6)
@@ -928,10 +475,11 @@ window.history.replaceState failed DOMException {}
928
475
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
929
476
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
930
477
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
931
- ✓ test/unit/lib/oauth.test.ts (6)
932
- [?25l ❯ test/integration/sdk.test.tsx (2)
478
+ · test/unit/lib/oauth.test.ts (6)
479
+ · test/unit/shared/storage.test.ts (3)
480
+ [?25l ❯ test/integration/sdk.test.tsx (2)
933
481
  ❯ OAuth login (2)
934
- ✓ should set the correct auth url for login with redirect 341ms
482
+ ✓ should set the correct auth url for login with redirect 422ms
935
483
  ⠋ should initiate code exchange, validate tokens, and derive user from ID token
936
484
  ✓ test/unit/nextjs/config.test.ts (10)
937
485
  ✓ test/unit/server/login.test.ts (6)
@@ -941,10 +489,11 @@ window.history.replaceState failed DOMException {}
941
489
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
942
490
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
943
491
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
944
- ✓ test/unit/lib/oauth.test.ts (6)
945
- [?25l ❯ test/integration/sdk.test.tsx (2)
492
+ · test/unit/lib/oauth.test.ts (6)
493
+ · test/unit/shared/storage.test.ts (3)
494
+ [?25l ❯ test/integration/sdk.test.tsx (2)
946
495
  ❯ OAuth login (2)
947
- ✓ should set the correct auth url for login with redirect 341ms
496
+ ✓ should set the correct auth url for login with redirect 422ms
948
497
  ⠙ should initiate code exchange, validate tokens, and derive user from ID token
949
498
  ✓ test/unit/nextjs/config.test.ts (10)
950
499
  ✓ test/unit/server/login.test.ts (6)
@@ -954,10 +503,11 @@ window.history.replaceState failed DOMException {}
954
503
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
955
504
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
956
505
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
957
- ✓ test/unit/lib/oauth.test.ts (6)
958
- [?25l ❯ test/integration/sdk.test.tsx (2)
506
+ · test/unit/lib/oauth.test.ts (6)
507
+ · test/unit/shared/storage.test.ts (3)
508
+ [?25l ❯ test/integration/sdk.test.tsx (2)
959
509
  ❯ OAuth login (2)
960
- ✓ should set the correct auth url for login with redirect 341ms
510
+ ✓ should set the correct auth url for login with redirect 422ms
961
511
  ⠹ should initiate code exchange, validate tokens, and derive user from ID token
962
512
  ✓ test/unit/nextjs/config.test.ts (10)
963
513
  ✓ test/unit/server/login.test.ts (6)
@@ -967,10 +517,11 @@ window.history.replaceState failed DOMException {}
967
517
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
968
518
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
969
519
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
970
- ✓ test/unit/lib/oauth.test.ts (6)
971
- [?25l ❯ test/integration/sdk.test.tsx (2)
520
+ · test/unit/lib/oauth.test.ts (6)
521
+ ✓ test/unit/shared/storage.test.ts (3)
522
+ [?25l ❯ test/integration/sdk.test.tsx (2)
972
523
  ❯ OAuth login (2)
973
- ✓ should set the correct auth url for login with redirect 341ms
524
+ ✓ should set the correct auth url for login with redirect 422ms
974
525
  ⠸ should initiate code exchange, validate tokens, and derive user from ID token
975
526
  ✓ test/unit/nextjs/config.test.ts (10)
976
527
  ✓ test/unit/server/login.test.ts (6)
@@ -980,10 +531,24 @@ window.history.replaceState failed DOMException {}
980
531
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
981
532
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
982
533
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
983
- ✓ test/unit/lib/oauth.test.ts (6)
984
- [?25l ❯ test/integration/sdk.test.tsx (2)
534
+ · test/unit/lib/oauth.test.ts (6)
535
+ ✓ test/unit/shared/storage.test.ts (3)
536
+ stderr | test/unit/lib/oauth.test.ts > displayModeFromState > should return the display mode from the state
537
+ Failed to parse displayMode from state: state DOMException [InvalidCharacterError]: The string to be decoded is not correctly encoded.
538
+  at atob (node:buffer:1271:13)
539
+ at Module.displayModeFromState (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/lib/oauth.ts:59:24)
540
+ at /Users/kevincolgan/code/civic-auth/packages/civic-auth-client/test/unit/lib/oauth.test.ts:42:20
541
+ at file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:146:14
542
+ at file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:533:11
543
+ at runWithTimeout (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:61:7)
544
+ at runTest (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:986:17)
545
+  at processTicksAndRejections (node:internal/process/task_queues:95:5)
546
+ at runSuite (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
547
+ at runSuite (file:///Users/kevincolgan/code/civic-auth/node_modules/@vitest/runner/dist/index.js:1142:15)
548
+
549
+ [?25l ❯ test/integration/sdk.test.tsx (2)
985
550
  ❯ OAuth login (2)
986
- ✓ should set the correct auth url for login with redirect 341ms
551
+ ✓ should set the correct auth url for login with redirect 422ms
987
552
  ⠼ should initiate code exchange, validate tokens, and derive user from ID token
988
553
  ✓ test/unit/nextjs/config.test.ts (10)
989
554
  ✓ test/unit/server/login.test.ts (6)
@@ -993,24 +558,9 @@ window.history.replaceState failed DOMException {}
993
558
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
994
559
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
995
560
  ✓ 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
561
+ · test/unit/lib/oauth.test.ts (6)
562
+ ✓ test/unit/shared/storage.test.ts (3)
563
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1014
564
  ✓ test/unit/nextjs/config.test.ts (10)
1015
565
  ✓ test/unit/server/login.test.ts (6)
1016
566
  ✓ test/unit/logger.test.ts (11)
@@ -1019,8 +569,9 @@ window.history.replaceState failed DOMException {}
1019
569
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1020
570
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1021
571
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1022
- ✓ test/unit/lib/oauth.test.ts (6)
1023
- [?25l ✓ test/integration/sdk.test.tsx (2) 464ms
572
+ · test/unit/lib/oauth.test.ts (6)
573
+ ✓ test/unit/shared/storage.test.ts (3)
574
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1024
575
  ✓ test/unit/nextjs/config.test.ts (10)
1025
576
  ✓ test/unit/server/login.test.ts (6)
1026
577
  ✓ test/unit/logger.test.ts (11)
@@ -1030,7 +581,8 @@ window.history.replaceState failed DOMException {}
1030
581
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1031
582
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1032
583
  ✓ test/unit/lib/oauth.test.ts (6)
1033
- [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
584
+ ✓ test/unit/shared/storage.test.ts (3)
585
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1034
586
  ✓ test/unit/nextjs/config.test.ts (10)
1035
587
  ✓ test/unit/server/login.test.ts (6)
1036
588
  ✓ test/unit/logger.test.ts (11)
@@ -1040,8 +592,9 @@ window.history.replaceState failed DOMException {}
1040
592
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1041
593
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1042
594
  ✓ 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
595
+ ✓ test/unit/shared/storage.test.ts (3)
596
+ · test/unit/server/session.test.ts (3)
597
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1045
598
  ✓ test/unit/nextjs/config.test.ts (10)
1046
599
  ✓ test/unit/server/login.test.ts (6)
1047
600
  ✓ test/unit/logger.test.ts (11)
@@ -1052,7 +605,8 @@ window.history.replaceState failed DOMException {}
1052
605
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1053
606
  ✓ test/unit/lib/oauth.test.ts (6)
1054
607
  ✓ test/unit/shared/storage.test.ts (3)
1055
- [?25l ✓ test/integration/sdk.test.tsx (2) 464ms
608
+ ✓ test/unit/server/session.test.ts (3)
609
+ [?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1056
610
  ✓ test/unit/nextjs/config.test.ts (10)
1057
611
  ✓ test/unit/server/login.test.ts (6)
1058
612
  ✓ test/unit/logger.test.ts (11)
@@ -1063,12 +617,10 @@ window.history.replaceState failed DOMException {}
1063
617
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1064
618
  ✓ test/unit/lib/oauth.test.ts (6)
1065
619
  ✓ test/unit/shared/storage.test.ts (3)
620
+ ✓ test/unit/server/session.test.ts (3)
1066
621
  · 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
622
+ · test/unit/shared/UserSession.test.ts (2)
623
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1072
624
  ✓ test/unit/nextjs/config.test.ts (10)
1073
625
  ✓ test/unit/server/login.test.ts (6)
1074
626
  ✓ test/unit/logger.test.ts (11)
@@ -1079,8 +631,10 @@ defaultServerSecure: false
1079
631
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1080
632
  ✓ test/unit/lib/oauth.test.ts (6)
1081
633
  ✓ 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
634
+ ✓ test/unit/server/session.test.ts (3)
635
+ ✓ test/unit/utils.test.ts (4)
636
+ · test/unit/shared/UserSession.test.ts (2)
637
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1084
638
  ✓ test/unit/nextjs/config.test.ts (10)
1085
639
  ✓ test/unit/server/login.test.ts (6)
1086
640
  ✓ test/unit/logger.test.ts (11)
@@ -1091,9 +645,10 @@ defaultServerSecure: false
1091
645
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1092
646
  ✓ test/unit/lib/oauth.test.ts (6)
1093
647
  ✓ 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
648
+ ✓ test/unit/server/session.test.ts (3)
649
+ ✓ test/unit/utils.test.ts (4)
650
+ ✓ test/unit/shared/UserSession.test.ts (2)
651
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1097
652
  ✓ test/unit/nextjs/config.test.ts (10)
1098
653
  ✓ test/unit/server/login.test.ts (6)
1099
654
  ✓ test/unit/logger.test.ts (11)
@@ -1104,9 +659,11 @@ defaultServerSecure: false
1104
659
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1105
660
  ✓ test/unit/lib/oauth.test.ts (6)
1106
661
  ✓ test/unit/shared/storage.test.ts (3)
1107
- · test/unit/server/session.test.ts (3)
662
+ ✓ test/unit/server/session.test.ts (3)
1108
663
  ✓ test/unit/utils.test.ts (4)
1109
- [?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
664
+ · test/unit/nextjs/getUser.test.ts (1)
665
+ ✓ test/unit/shared/UserSession.test.ts (2)
666
+ [?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1110
667
  ✓ test/unit/nextjs/config.test.ts (10)
1111
668
  ✓ test/unit/server/login.test.ts (6)
1112
669
  ✓ test/unit/logger.test.ts (11)
@@ -1119,7 +676,10 @@ defaultServerSecure: false
1119
676
  ✓ test/unit/shared/storage.test.ts (3)
1120
677
  ✓ test/unit/server/session.test.ts (3)
1121
678
  ✓ test/unit/utils.test.ts (4)
1122
- [?25l[?25l[?25l[?25l[?25l[?25l ✓ test/unit/nextjs/config.test.ts (10)
679
+ ✓ test/unit/nextjs/getUser.test.ts (1)
680
+ ✓ test/unit/shared/UserSession.test.ts (2)
681
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
682
+ ✓ test/unit/nextjs/config.test.ts (10)
1123
683
  ✓ test/unit/server/login.test.ts (6)
1124
684
  ✓ test/unit/logger.test.ts (11)
1125
685
  ✓ test/unit/services/AuthenticationService.test.ts (6)
@@ -1131,8 +691,12 @@ defaultServerSecure: false
1131
691
  ✓ test/unit/shared/storage.test.ts (3)
1132
692
  ✓ test/unit/server/session.test.ts (3)
1133
693
  ✓ test/unit/utils.test.ts (4)
1134
- · test/unit/shared/UserSession.test.ts (2)
1135
- [?25l ✓ test/unit/server/login.test.ts (6)
694
+ ✓ test/unit/nextjs/getUser.test.ts (1)
695
+ · test/unit/react/components/SignOutButton.test.tsx (2)
696
+ ✓ test/unit/shared/UserSession.test.ts (2)
697
+ [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
698
+ ✓ test/unit/nextjs/config.test.ts (10)
699
+ ✓ test/unit/server/login.test.ts (6)
1136
700
  ✓ test/unit/logger.test.ts (11)
1137
701
  ✓ test/unit/services/AuthenticationService.test.ts (6)
1138
702
  ✓ test/unit/nextjs/middleware.test.ts (7)
@@ -1143,9 +707,55 @@ defaultServerSecure: false
1143
707
  ✓ test/unit/shared/storage.test.ts (3)
1144
708
  ✓ test/unit/server/session.test.ts (3)
1145
709
  ✓ test/unit/utils.test.ts (4)
710
+ ✓ test/unit/nextjs/getUser.test.ts (1)
711
+ · test/unit/react/components/SignInButton.test.tsx (2)
712
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1146
713
  ✓ 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)
714
+ [?25l[?25l[?25l[?25lstderr | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should render a SignOutButton component
715
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
716
+
717
+ When testing, code that causes React state updates should be wrapped into act(...):
718
+
719
+ act(() => {
720
+ /* fire events that update state */
721
+ });
722
+ /* assert on the output */
723
+
724
+ 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
725
+ at CivicAuthIframeContainer (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
726
+ at div
727
+ at TokenProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
728
+ at SessionProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
729
+ at IframeProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
730
+ at ConfigProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
731
+ at AuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
732
+ at QueryClientProvider (file:///Users/kevincolgan/code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
733
+ at CivicAuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
734
+
735
+ stderr | test/unit/react/components/SignOutButton.test.tsx > SignOutButton Component > should call signIn when the button is clicked
736
+ Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
737
+
738
+ When testing, code that causes React state updates should be wrapped into act(...):
739
+
740
+ act(() => {
741
+ /* fire events that update state */
742
+ });
743
+ /* assert on the output */
744
+
745
+ 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
746
+ at CivicAuthIframeContainer (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
747
+ at div
748
+ at TokenProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
749
+ at SessionProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
750
+ at IframeProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
751
+ at ConfigProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
752
+ at AuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
753
+ at QueryClientProvider (file:///Users/kevincolgan/code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
754
+ at CivicAuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
755
+
756
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
757
+ ✓ test/unit/nextjs/config.test.ts (10)
758
+ ✓ test/unit/server/login.test.ts (6)
1149
759
  ✓ test/unit/logger.test.ts (11)
1150
760
  ✓ test/unit/services/AuthenticationService.test.ts (6)
1151
761
  ✓ test/unit/nextjs/middleware.test.ts (7)
@@ -1156,9 +766,14 @@ defaultServerSecure: false
1156
766
  ✓ test/unit/shared/storage.test.ts (3)
1157
767
  ✓ test/unit/server/session.test.ts (3)
1158
768
  ✓ test/unit/utils.test.ts (4)
769
+ ✓ test/unit/nextjs/getUser.test.ts (1)
770
+ · test/unit/react/components/SignInButton.test.tsx (2)
771
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1159
772
  ✓ 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)
773
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
774
+ ✓ test/unit/nextjs/config.test.ts (10)
775
+ ✓ test/unit/server/login.test.ts (6)
776
+ ✓ test/unit/logger.test.ts (11)
1162
777
  ✓ test/unit/services/AuthenticationService.test.ts (6)
1163
778
  ✓ test/unit/nextjs/middleware.test.ts (7)
1164
779
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
@@ -1168,10 +783,16 @@ defaultServerSecure: false
1168
783
  ✓ test/unit/shared/storage.test.ts (3)
1169
784
  ✓ test/unit/server/session.test.ts (3)
1170
785
  ✓ test/unit/utils.test.ts (4)
1171
- · test/unit/nextjs/getUser.test.ts (1)
786
+ ✓ test/unit/nextjs/getUser.test.ts (1)
787
+ · test/unit/react/components/SignInButton.test.tsx (2)
788
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1172
789
  ✓ test/unit/shared/UserSession.test.ts (2)
1173
- ✓ test/unit/nextjs/utils.test.ts (1)
1174
- [?25l ✓ test/unit/services/AuthenticationService.test.ts (6)
790
+ · test/unit/nextjs/utils.test.ts (1)
791
+ [?25l[?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
792
+ ✓ test/unit/nextjs/config.test.ts (10)
793
+ ✓ test/unit/server/login.test.ts (6)
794
+ ✓ test/unit/logger.test.ts (11)
795
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1175
796
  ✓ test/unit/nextjs/middleware.test.ts (7)
1176
797
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1177
798
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
@@ -1180,11 +801,16 @@ defaultServerSecure: false
1180
801
  ✓ test/unit/shared/storage.test.ts (3)
1181
802
  ✓ test/unit/server/session.test.ts (3)
1182
803
  ✓ test/unit/utils.test.ts (4)
804
+ ✓ test/unit/nextjs/getUser.test.ts (1)
1183
805
  · test/unit/react/components/SignInButton.test.tsx (2)
1184
- · test/unit/nextjs/getUser.test.ts (1)
806
+ · test/unit/react/components/SignOutButton.test.tsx (2)
1185
807
  ✓ test/unit/shared/UserSession.test.ts (2)
1186
808
  ✓ test/unit/nextjs/utils.test.ts (1)
1187
- [?25l[?25l[?25l ✓ test/unit/services/AuthenticationService.test.ts (6)
809
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
810
+ ✓ test/unit/nextjs/config.test.ts (10)
811
+ ✓ test/unit/server/login.test.ts (6)
812
+ ✓ test/unit/logger.test.ts (11)
813
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1188
814
  ✓ test/unit/nextjs/middleware.test.ts (7)
1189
815
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1190
816
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
@@ -1193,51 +819,12 @@ defaultServerSecure: false
1193
819
  ✓ test/unit/shared/storage.test.ts (3)
1194
820
  ✓ test/unit/server/session.test.ts (3)
1195
821
  ✓ test/unit/utils.test.ts (4)
1196
- · test/unit/react/components/SignInButton.test.tsx (2)
1197
822
  ✓ 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
823
  · 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)
824
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1211
825
  ✓ test/unit/shared/UserSession.test.ts (2)
1212
826
  ✓ 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
827
+ [?25l[?25l[?25l[?25lstderr | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should render a SignInButton component
1241
828
  Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1242
829
 
1243
830
  When testing, code that causes React state updates should be wrapped into act(...):
@@ -1248,42 +835,15 @@ act(() => {
1248
835
  /* assert on the output */
1249
836
 
1250
837
  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)
838
+ at CivicAuthIframeContainer (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1252
839
  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
840
+ at TokenProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
841
+ at SessionProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
842
+ at IframeProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
843
+ at ConfigProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
844
+ at AuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
845
+ at QueryClientProvider (file:///Users/kevincolgan/code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
846
+ at CivicAuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
1287
847
 
1288
848
  stderr | test/unit/react/components/SignInButton.test.tsx > SignInButton Component > should call signIn when the button is clicked
1289
849
  Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
@@ -1296,180 +856,93 @@ act(() => {
1296
856
  /* assert on the output */
1297
857
 
1298
858
  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)
859
+ at CivicAuthIframeContainer (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1300
860
  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)
861
+ at TokenProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
862
+ at SessionProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
863
+ at IframeProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
864
+ at ConfigProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
865
+ at AuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
866
+ at QueryClientProvider (file:///Users/kevincolgan/code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
867
+ at CivicAuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/CivicAuthProvider.tsx:15:30)
868
+
869
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
870
+ ✓ test/unit/nextjs/config.test.ts (10)
871
+ ✓ test/unit/server/login.test.ts (6)
872
+ ✓ test/unit/logger.test.ts (11)
873
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
874
+ ✓ test/unit/nextjs/middleware.test.ts (7)
875
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1310
876
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1311
877
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1312
878
  ✓ test/unit/lib/oauth.test.ts (6)
1313
879
  ✓ test/unit/shared/storage.test.ts (3)
1314
880
  ✓ test/unit/server/session.test.ts (3)
1315
881
  ✓ 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
882
  ✓ test/unit/nextjs/getUser.test.ts (1)
1319
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
883
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
884
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1320
885
  ✓ test/unit/shared/UserSession.test.ts (2)
1321
886
  ✓ test/unit/nextjs/utils.test.ts (1)
1322
- [?25l[?25l[?25l[?25l ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
887
+ [?25l[?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
888
+ ✓ test/unit/nextjs/config.test.ts (10)
889
+ ✓ test/unit/server/login.test.ts (6)
890
+ ✓ test/unit/logger.test.ts (11)
891
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
892
+ ✓ test/unit/nextjs/middleware.test.ts (7)
893
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1323
894
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1324
895
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1325
896
  ✓ test/unit/lib/oauth.test.ts (6)
1326
897
  ✓ test/unit/shared/storage.test.ts (3)
1327
898
  ✓ test/unit/server/session.test.ts (3)
1328
899
  ✓ 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
900
  ✓ test/unit/nextjs/getUser.test.ts (1)
1332
- · test/unit/nextjs/NextAuthProvider.test.tsx (1)
901
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
902
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1333
903
  ✓ test/unit/shared/UserSession.test.ts (2)
1334
904
  ✓ 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)
905
+ · test/unit/publicApi/apiSnapshot.test.ts (1)
906
+ [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
907
+ ✓ test/unit/nextjs/config.test.ts (10)
908
+ ✓ test/unit/server/login.test.ts (6)
909
+ ✓ test/unit/logger.test.ts (11)
910
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
911
+ ✓ test/unit/nextjs/middleware.test.ts (7)
912
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1412
913
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1413
914
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1414
915
  ✓ test/unit/lib/oauth.test.ts (6)
1415
916
  ✓ test/unit/shared/storage.test.ts (3)
1416
917
  ✓ test/unit/server/session.test.ts (3)
1417
918
  ✓ 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
919
  ✓ test/unit/nextjs/getUser.test.ts (1)
1421
- ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
920
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
921
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1422
922
  ✓ test/unit/shared/UserSession.test.ts (2)
1423
923
  ✓ 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
924
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
925
+ [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
926
+ ✓ test/unit/nextjs/config.test.ts (10)
927
+ ✓ test/unit/server/login.test.ts (6)
928
+ ✓ test/unit/logger.test.ts (11)
929
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
930
+ ✓ test/unit/nextjs/middleware.test.ts (7)
931
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
932
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
933
+ ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
934
+ ✓ test/unit/lib/oauth.test.ts (6)
935
+ ✓ test/unit/shared/storage.test.ts (3)
936
+ ✓ test/unit/server/session.test.ts (3)
937
+ ✓ test/unit/utils.test.ts (4)
938
+ ✓ test/unit/nextjs/getUser.test.ts (1)
939
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
940
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
941
+ ✓ test/unit/shared/UserSession.test.ts (2)
942
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
943
+ ✓ test/unit/nextjs/utils.test.ts (1)
944
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
945
+ [?25l[?25l[?25l[?25l[?25l[?25l[?25l[?25lstderr | test/unit/nextjs/NextAuthProvider.test.tsx > CivicNextAuthProvider > should call resolveAuthConfig with no arguments
1473
946
  Warning: An update to CivicAuthIframeContainer inside a test was not wrapped in act(...).
1474
947
 
1475
948
  When testing, code that causes React state updates should be wrapped into act(...):
@@ -1480,199 +953,201 @@ act(() => {
1480
953
  /* assert on the output */
1481
954
 
1482
955
  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)
956
+ at CivicAuthIframeContainer (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/components/CivicAuthIframeContainer.tsx:79:3)
1484
957
  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)
958
+ at TokenProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/TokenProvider.tsx:15:26)
959
+ at SessionProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/SessionProvider.tsx:11:28)
960
+ at IframeProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/IframeProvider.tsx:11:3)
961
+ at ConfigProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/ConfigProvider.tsx:14:3)
962
+ at AuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/shared/providers/AuthProvider.tsx:83:3)
963
+ at CivicNextAuthProviderInternal (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/nextjs/providers/NextAuthProvider.tsx:26:3)
964
+ at QueryClientProvider (file:///Users/kevincolgan/code/civic-auth/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:3)
965
+ at CivicNextAuthProvider (/Users/kevincolgan/code/civic-auth/packages/civic-auth-client/src/nextjs/providers/NextAuthProvider.tsx:75:3)
966
+
967
+ [?25l ✓ test/integration/sdk.test.tsx (2) 495ms
968
+ ✓ test/unit/nextjs/config.test.ts (10)
969
+ ✓ test/unit/server/login.test.ts (6)
970
+ ✓ test/unit/logger.test.ts (11)
971
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
972
+ ✓ test/unit/nextjs/middleware.test.ts (7)
973
+ ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1494
974
  ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1495
975
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1496
976
  ✓ test/unit/lib/oauth.test.ts (6)
1497
977
  ✓ test/unit/shared/storage.test.ts (3)
1498
978
  ✓ test/unit/server/session.test.ts (3)
1499
979
  ✓ 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
980
  ✓ 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)
981
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
1513
982
  ✓ 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
983
  ✓ test/unit/shared/UserSession.test.ts (2)
984
+ · test/unit/nextjs/NextAuthProvider.test.tsx (1)
1517
985
  ✓ 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)
986
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
987
+ [?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
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)
1520
995
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1521
996
  ✓ test/unit/lib/oauth.test.ts (6)
1522
997
  ✓ test/unit/shared/storage.test.ts (3)
1523
998
  ✓ test/unit/server/session.test.ts (3)
1524
999
  ✓ 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
1000
  ✓ test/unit/nextjs/getUser.test.ts (1)
1528
- ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1001
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
1002
+ ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1529
1003
  ✓ test/unit/shared/UserSession.test.ts (2)
1004
+ ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1530
1005
  ✓ test/unit/nextjs/utils.test.ts (1)
1531
1006
  ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1532
- [?25l[?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 464ms
1007
+ [?25l[?25l[?25l ✓ test/integration/sdk.test.tsx (2) 495ms
1533
1008
  ✓ test/unit/logger.test.ts (11)
1534
1009
  ✓ 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)
1010
+ ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1538
1011
  ✓ test/unit/nextjs/NextAuthProvider.test.tsx (1)
1539
1012
  ✓ test/unit/nextjs/config.test.ts (10)
1540
1013
  ✓ test/unit/nextjs/getUser.test.ts (1)
1541
1014
  ✓ test/unit/nextjs/middleware.test.ts (7)
1542
1015
  ✓ test/unit/nextjs/utils.test.ts (1)
1543
- ✓ test/unit/services/AuthenticationService.test.ts (6)
1544
- ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1016
+ ✓ test/unit/server/login.test.ts (6)
1017
+ ✓ test/unit/server/session.test.ts (3)
1545
1018
  ✓ test/unit/shared/GenericAuthenticationRefresher.test.ts (3)
1546
1019
  ✓ test/unit/shared/UserSession.test.ts (2)
1547
1020
  ✓ test/unit/shared/storage.test.ts (3)
1548
- ✓ test/unit/publicApi/apiSnapshot.test.ts (1)
1549
- ✓ test/unit/react/components/SignInButton.test.tsx (2)
1021
+ ✓ test/unit/lib/oauth.test.ts (6)
1022
+ ✓ test/unit/services/AuthenticationService.test.ts (6)
1023
+ ✓ test/unit/services/ServerAuthenticationResolver.test.ts (5)
1024
+ ✓ test/unit/react/components/SignInButton.test.tsx (2) 316ms
1550
1025
  ✓ test/unit/react/components/SignOutButton.test.tsx (2)
1551
1026
  ✓ test/unit/shared/components/CivicAuthIframeContainer.test.tsx (3)
1552
1027
 
1553
1028
   Test Files  20 passed (20)
1554
1029
   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)
1030
+  Start at  19:04:00
1031
+  Duration  4.84s (transform 1.51s, setup 0ms, collect 7.74s, tests 1.53s, environment 15.11s, prepare 3.68s)
1557
1032
 
1558
1033
   % 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
- -----------------------------------------|---------|----------|---------|---------|---------------------------------
1034
+ ---------------------------------------|---------|----------|---------|---------|-------------------
1035
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
1036
+ ---------------------------------------|---------|----------|---------|---------|-------------------
1037
+ All files  |  80.56 |  85.94 |  70.76 |  80.56 |  
1038
+  src  |  100 |  100 |  100 |  100 |  
1039
+  config.ts  |  100 |  100 |  100 |  100 |  
1040
+  constants.ts  |  100 |  100 |  100 |  100 |  
1041
+ index.ts | 0 | 0 | 0 | 0 |  
1042
+ types.ts | 0 | 0 | 0 | 0 |  
1043
+  utils.ts  |  100 |  100 |  100 |  100 |  
1044
+  src/browser  |  100 |  100 |  100 |  100 |  
1045
+  storage.ts  |  100 |  100 |  100 |  100 |  
1046
+  src/lib  |  70.87 |  81.48 |  83.33 |  70.87 |  
1047
+  cookies.ts  |  4.16 |  100 |  0 |  4.16 | 2-27 
1048
+  jwt.ts  |  100 |  100 |  100 |  100 |  
1049
+  logger.ts  |  100 |  100 |  100 |  100 |  
1050
+  oauth.ts  |  83.63 |  81.81 |  83.33 |  83.63 | 6,68-75 
1051
+  postMessage.ts  |  5.55 |  100 |  0 |  5.55 | 4-20 
1052
+  windowUtil.ts  |  82.6 |  57.14 |  100 |  82.6 | 6-7,11-12 
1053
+  src/nextjs  |  47.43 |  86.04 |  40.74 |  47.43 |  
1054
+  GetUser.ts  |  100 |  33.33 |  100 |  100 | 14-20 
1055
+  config.ts  |  99.18 |  81.25 |  100 |  99.18 | 124 
1056
+  cookies.ts  |  19.81 |  100 |  10 |  19.81 | ...46-148,151-153
1057
+  index.ts  |  100 |  100 |  100 |  100 |  
1058
+  middleware.ts  |  100 |  95.45 |  100 |  100 | 49 
1059
+  routeHandler.ts  |  4.25 |  100 |  0 |  4.25 | ...16-251,267-297
1060
+  utils.ts  |  100 |  100 |  100 |  100 |  
1061
+  src/nextjs/hooks  |  11.29 |  100 |  0 |  11.29 |  
1062
+  index.ts  |  100 |  100 |  100 |  100 |  
1063
+  useTokenCookie.ts  |  9.67 |  100 |  0 |  9.67 | 9-14,17-41 
1064
+  useUserCookie.ts  |  10 |  100 |  0 |  10 | 10-14,17-41 
1065
+  src/nextjs/middleware  |  100 |  100 |  100 |  100 |  
1066
+  index.ts  |  100 |  100 |  100 |  100 |  
1067
+  src/nextjs/providers  |  87.93 |  71.42 |  66.66 |  87.93 |  
1068
+  NextAuthProvider.tsx  |  87.93 |  71.42 |  66.66 |  87.93 | 47-53 
1069
+  src/reactjs  |  100 |  100 |  100 |  100 |  
1070
+  index.ts  |  100 |  100 |  100 |  100 |  
1071
+  src/reactjs/components  |  19.81 |  100 |  57.14 |  19.81 |  
1072
+  SignInButton.tsx  |  100 |  100 |  100 |  100 |  
1073
+  SignOutButton.tsx  |  100 |  100 |  100 |  100 |  
1074
+  UserButton.tsx  |  2.29 |  100 |  0 |  2.29 | 7-20,24-37,41-213
1075
+  index.ts  |  100 |  100 |  100 |  100 |  
1076
+  src/reactjs/hooks  |  44.44 |  33.33 |  50 |  44.44 |  
1077
+  index.ts  |  100 |  100 |  100 |  100 |  
1078
+  useAuth.ts  |  0 |  0 |  0 |  0 | 1-13 
1079
+  useUser.ts  |  77.77 |  50 |  100 |  77.77 | 14-15 
1080
+  src/reactjs/providers  |  100 |  100 |  100 |  100 |  
1081
+  index.ts  |  100 |  100 |  100 |  100 |  
1082
+  src/server  |  85.48 |  73.68 |  76.92 |  85.48 |  
1083
+  ServerAuthenticationResolver.ts  |  97.22 |  88.88 |  85.71 |  97.22 | 31-32 
1084
+ config.ts | 0 | 0 | 0 | 0 |  
1085
+  index.ts  |  0 |  0 |  0 |  0 | 1 
1086
+  login.ts  |  100 |  71.42 |  100 |  100 | 23,52 
1087
+  refresh.ts  |  0 |  0 |  0 |  0 | 1-23 
1088
+  src/services  |  69.81 |  72.72 |  84 |  69.81 |  
1089
+  AuthenticationService.ts  |  69.27 |  67.85 |  88.88 |  69.27 | ...63-264,295-313
1090
+  PKCE.ts  |  77.77 |  100 |  83.33 |  77.77 | 12-17 
1091
+  types.ts  |  50 |  100 |  0 |  50 | 51-53 
1092
+  src/shared/components  |  93.23 |  86.36 |  71.42 |  93.23 |  
1093
+  CivicAuthIframe.tsx  |  100 |  100 |  100 |  100 |  
1094
+  CivicAuthIframeContainer.tsx  |  89.92 |  84.21 |  60 |  89.92 | ...41-144,158-159
1095
+  CloseIcon.tsx  |  100 |  100 |  100 |  100 |  
1096
+  LoadingIcon.tsx  |  100 |  100 |  100 |  100 |  
1097
+  src/shared/hooks  |  75.6 |  50 |  100 |  75.6 |  
1098
+  index.ts  |  100 |  100 |  100 |  100 |  
1099
+  useAuth.ts  |  75 |  50 |  100 |  75 | 9-10 
1100
+  useConfig.ts  |  75 |  50 |  100 |  75 | 9-10 
1101
+  useIframe.ts  |  75 |  50 |  100 |  75 | 9-10 
1102
+  useSession.ts  |  75 |  50 |  100 |  75 | 9-10 
1103
+  useToken.ts  |  75 |  50 |  100 |  75 | 9-10 
1104
+  src/shared/lib  |  92.77 |  86 |  90.9 |  92.77 |  
1105
+  GenericAuthenticationRefresher.ts  |  100 |  85.71 |  100 |  100 | 55 
1106
+  UserSession.ts  |  100 |  87.5 |  100 |  100 | 22 
1107
+  session.ts  |  100 |  100 |  100 |  100 |  
1108
+  storage.ts  |  100 |  100 |  100 |  100 |  
1109
+  types.ts  |  100 |  100 |  100 |  100 |  
1110
+  util.ts  |  88.31 |  75 |  81.81 |  88.31 | ...31-135,163-166
1111
+  src/shared/providers  |  85.36 |  77.01 |  61.11 |  85.36 |  
1112
+  AuthContext.tsx  |  100 |  100 |  100 |  100 |  
1113
+  AuthProvider.tsx  |  80.06 |  72.13 |  50 |  80.06 | ...29-330,375-379
1114
+  CivicAuthProvider.tsx  |  100 |  100 |  100 |  100 |  
1115
+  ConfigProvider.tsx  |  100 |  100 |  100 |  100 |  
1116
+  IframeProvider.tsx  |  100 |  100 |  50 |  100 |  
1117
+  SessionProvider.tsx  |  100 |  100 |  100 |  100 |  
1118
+  TokenProvider.tsx  |  88.88 |  84.61 |  33.33 |  88.88 | 30-31,34-35,49 
1119
+  UserProvider.tsx  |  95.45 |  87.5 |  100 |  95.45 | 42-43 
1120
+  test/integration  |  98.96 |  94.11 |  100 |  98.96 |  
1121
+  sdk.test.tsx  |  98.96 |  94.11 |  100 |  98.96 | 31-32 
1122
+  test/support  |  100 |  100 |  100 |  100 |  
1123
+  fixtures.ts  |  100 |  100 |  100 |  100 |  
1124
+  test/unit  |  100 |  100 |  100 |  100 |  
1125
+  logger.test.ts  |  100 |  100 |  100 |  100 |  
1126
+  utils.test.ts  |  100 |  100 |  100 |  100 |  
1127
+  test/unit/lib  |  100 |  100 |  100 |  100 |  
1128
+  oauth.test.ts  |  100 |  100 |  100 |  100 |  
1129
+  test/unit/nextjs  |  99.7 |  97.67 |  100 |  99.7 |  
1130
+  NextAuthProvider.test.tsx  |  100 |  100 |  100 |  100 |  
1131
+  config.test.ts  |  100 |  100 |  100 |  100 |  
1132
+  getUser.test.ts  |  97.29 |  87.5 |  100 |  97.29 | 31 
1133
+  middleware.test.ts  |  100 |  100 |  100 |  100 |  
1134
+  utils.test.ts  |  100 |  100 |  100 |  100 |  
1135
+  test/unit/publicApi  |  100 |  100 |  100 |  100 |  
1136
+  apiSnapshot.test.ts  |  100 |  100 |  100 |  100 |  
1137
+  test/unit/react/components  |  100 |  100 |  0 |  100 |  
1138
+  SignInButton.test.tsx  |  100 |  100 |  0 |  100 |  
1139
+  SignOutButton.test.tsx  |  100 |  100 |  0 |  100 |  
1140
+  test/unit/server  |  97.72 |  76.19 |  33.33 |  97.72 |  
1141
+  login.test.ts  |  97.16 |  68.75 |  33.33 |  97.16 | 23-24,27-28 
1142
+  session.test.ts  |  100 |  100 |  100 |  100 |  
1143
+  test/unit/services  |  100 |  100 |  100 |  100 |  
1144
+  AuthenticationService.test.ts  |  100 |  100 |  100 |  100 |  
1145
+  ServerAuthenticationResolver.test.ts |  100 |  100 |  100 |  100 |  
1146
+  test/unit/shared  |  100 |  100 |  100 |  100 |  
1147
+  ...icAuthenticationRefresher.test.ts |  100 |  100 |  100 |  100 |  
1148
+  UserSession.test.ts  |  100 |  100 |  100 |  100 |  
1149
+  storage.test.ts  |  100 |  100 |  100 |  100 |  
1150
+  test/unit/shared/components  |  100 |  100 |  100 |  100 |  
1151
+  CivicAuthIframeContainer.test.tsx  |  100 |  100 |  100 |  100 |  
1152
+ ---------------------------------------|---------|----------|---------|---------|-------------------
1678
1153
  [?25h[?25h