@civic/auth 0.0.1-tsc.alpha.3 → 0.1.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-lint$colon$fix.log +10 -0
- package/.turbo/turbo-test.log +722 -1011
- package/CHANGELOG.md +5 -0
- package/dist/cjs/src/browser/storage.d.ts +2 -2
- package/dist/cjs/src/browser/storage.d.ts.map +1 -1
- package/dist/cjs/src/browser/storage.js +3 -3
- package/dist/cjs/src/browser/storage.js.map +1 -1
- package/dist/cjs/src/nextjs/GetUser.d.ts +1 -1
- package/dist/cjs/src/nextjs/GetUser.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/GetUser.js +3 -3
- package/dist/cjs/src/nextjs/GetUser.js.map +1 -1
- package/dist/cjs/src/nextjs/config.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/config.js +1 -4
- package/dist/cjs/src/nextjs/config.js.map +1 -1
- package/dist/cjs/src/nextjs/cookies.d.ts +4 -4
- package/dist/cjs/src/nextjs/cookies.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/cookies.js +14 -11
- package/dist/cjs/src/nextjs/cookies.js.map +1 -1
- package/dist/cjs/src/nextjs/index.d.ts +1 -1
- package/dist/cjs/src/nextjs/index.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/index.js.map +1 -1
- package/dist/cjs/src/nextjs/routeHandler.d.ts.map +1 -1
- package/dist/cjs/src/nextjs/routeHandler.js +1 -5
- package/dist/cjs/src/nextjs/routeHandler.js.map +1 -1
- package/dist/cjs/src/reactjs/hooks/index.d.ts +0 -1
- package/dist/cjs/src/reactjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/src/reactjs/hooks/index.js +1 -3
- package/dist/cjs/src/reactjs/hooks/index.js.map +1 -1
- package/dist/cjs/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
- package/dist/cjs/src/server/ServerAuthenticationResolver.js +2 -7
- package/dist/cjs/src/server/ServerAuthenticationResolver.js.map +1 -1
- package/dist/cjs/src/server/login.d.ts +2 -2
- package/dist/cjs/src/server/login.d.ts.map +1 -1
- package/dist/cjs/src/server/login.js +2 -2
- package/dist/cjs/src/server/login.js.map +1 -1
- package/dist/cjs/src/services/AuthenticationService.d.ts.map +1 -1
- package/dist/cjs/src/services/AuthenticationService.js +6 -16
- package/dist/cjs/src/services/AuthenticationService.js.map +1 -1
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers → dist/cjs/src/shared}/AuthProvider.d.ts +7 -9
- package/dist/cjs/src/shared/AuthProvider.d.ts.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers → dist/cjs/src/shared}/AuthProvider.js +43 -46
- package/dist/cjs/src/shared/AuthProvider.js.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers → dist/cjs/src/shared}/CivicAuthProvider.d.ts +3 -3
- package/dist/cjs/src/shared/CivicAuthProvider.d.ts.map +1 -0
- package/dist/cjs/src/shared/CivicAuthProvider.js +19 -0
- package/dist/cjs/src/shared/CivicAuthProvider.js.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib → dist/cjs/src/shared}/GenericAuthenticationRefresher.d.ts +4 -4
- package/dist/cjs/src/shared/GenericAuthenticationRefresher.d.ts.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib → dist/cjs/src/shared}/GenericAuthenticationRefresher.js +4 -4
- package/dist/cjs/src/shared/GenericAuthenticationRefresher.js.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers → dist/cjs/src/shared}/UserProvider.d.ts +6 -7
- package/dist/cjs/src/shared/UserProvider.d.ts.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers → dist/cjs/src/shared}/UserProvider.js +11 -12
- package/dist/cjs/src/shared/UserProvider.js.map +1 -0
- package/dist/cjs/src/shared/UserSession.d.ts +12 -0
- package/dist/cjs/src/shared/UserSession.d.ts.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib → dist/cjs/src/shared}/UserSession.js +7 -7
- package/dist/cjs/src/shared/UserSession.js.map +1 -0
- package/dist/cjs/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
- package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js +7 -8
- package/dist/cjs/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
- package/dist/cjs/src/shared/components/LoadingIcon.d.ts.map +1 -1
- package/dist/cjs/src/shared/components/LoadingIcon.js +7 -1
- package/dist/cjs/src/shared/components/LoadingIcon.js.map +1 -1
- package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
- package/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
- package/dist/cjs/src/shared/lib/UserSession.d.ts +4 -4
- package/dist/cjs/src/shared/lib/UserSession.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/UserSession.js +4 -4
- package/dist/cjs/src/shared/lib/UserSession.js.map +1 -1
- package/dist/cjs/src/shared/lib/session.js +1 -1
- package/dist/cjs/src/shared/lib/session.js.map +1 -1
- package/dist/cjs/src/shared/lib/storage.d.ts +2 -2
- package/dist/cjs/src/shared/lib/storage.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/storage.js.map +1 -1
- package/dist/cjs/src/shared/lib/util.d.ts +4 -4
- package/dist/cjs/src/shared/lib/util.d.ts.map +1 -1
- package/dist/cjs/src/shared/lib/util.js +15 -17
- package/dist/cjs/src/shared/lib/util.js.map +1 -1
- package/dist/cjs/src/shared/providers/AuthProvider.d.ts.map +1 -1
- package/dist/cjs/src/shared/providers/AuthProvider.js +24 -23
- package/dist/cjs/src/shared/providers/AuthProvider.js.map +1 -1
- package/dist/cjs/src/shared/session.d.ts +3 -0
- package/dist/cjs/src/shared/session.d.ts.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib → dist/cjs/src/shared}/session.js +2 -2
- package/dist/cjs/src/shared/session.js.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib → dist/cjs/src/shared}/util.d.ts +10 -4
- package/dist/cjs/src/shared/util.d.ts.map +1 -0
- package/{.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib → dist/cjs/src/shared}/util.js +32 -12
- package/dist/cjs/src/shared/util.js.map +1 -0
- package/dist/cjs/src/types.d.ts +2 -2
- package/dist/cjs/src/types.d.ts.map +1 -1
- package/dist/cjs/src/types.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/browser/storage.d.ts +2 -2
- package/dist/esm/src/browser/storage.d.ts.map +1 -1
- package/dist/esm/src/browser/storage.js +3 -3
- package/dist/esm/src/browser/storage.js.map +1 -1
- package/dist/esm/src/nextjs/GetUser.d.ts +1 -1
- package/dist/esm/src/nextjs/GetUser.d.ts.map +1 -1
- package/dist/esm/src/nextjs/GetUser.js +3 -3
- package/dist/esm/src/nextjs/GetUser.js.map +1 -1
- package/dist/esm/src/nextjs/config.d.ts.map +1 -1
- package/dist/esm/src/nextjs/config.js +1 -4
- package/dist/esm/src/nextjs/config.js.map +1 -1
- package/dist/esm/src/nextjs/cookies.d.ts +4 -4
- package/dist/esm/src/nextjs/cookies.d.ts.map +1 -1
- package/dist/esm/src/nextjs/cookies.js +14 -11
- package/dist/esm/src/nextjs/cookies.js.map +1 -1
- package/dist/esm/src/nextjs/index.d.ts +1 -1
- package/dist/esm/src/nextjs/index.d.ts.map +1 -1
- package/dist/esm/src/nextjs/index.js +1 -1
- package/dist/esm/src/nextjs/index.js.map +1 -1
- package/dist/esm/src/nextjs/routeHandler.d.ts.map +1 -1
- package/dist/esm/src/nextjs/routeHandler.js +1 -5
- package/dist/esm/src/nextjs/routeHandler.js.map +1 -1
- package/dist/esm/src/reactjs/hooks/index.d.ts +0 -1
- package/dist/esm/src/reactjs/hooks/index.d.ts.map +1 -1
- package/dist/esm/src/reactjs/hooks/index.js +0 -1
- package/dist/esm/src/reactjs/hooks/index.js.map +1 -1
- package/dist/esm/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
- package/dist/esm/src/server/ServerAuthenticationResolver.js +2 -7
- package/dist/esm/src/server/ServerAuthenticationResolver.js.map +1 -1
- package/dist/esm/src/server/login.d.ts +2 -2
- package/dist/esm/src/server/login.d.ts.map +1 -1
- package/dist/esm/src/server/login.js +2 -2
- package/dist/esm/src/server/login.js.map +1 -1
- package/dist/esm/src/services/AuthenticationService.d.ts.map +1 -1
- package/dist/esm/src/services/AuthenticationService.js +6 -16
- package/dist/esm/src/services/AuthenticationService.js.map +1 -1
- package/dist/esm/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
- package/dist/esm/src/shared/components/CivicAuthIframeContainer.js +7 -8
- package/dist/esm/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
- package/dist/esm/src/shared/components/LoadingIcon.d.ts.map +1 -1
- package/dist/esm/src/shared/components/LoadingIcon.js +7 -1
- package/dist/esm/src/shared/components/LoadingIcon.js.map +1 -1
- package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
- package/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
- package/dist/esm/src/shared/lib/UserSession.d.ts +4 -4
- package/dist/esm/src/shared/lib/UserSession.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/UserSession.js +4 -4
- package/dist/esm/src/shared/lib/UserSession.js.map +1 -1
- package/dist/esm/src/shared/lib/session.js +1 -1
- package/dist/esm/src/shared/lib/session.js.map +1 -1
- package/dist/esm/src/shared/lib/storage.d.ts +2 -2
- package/dist/esm/src/shared/lib/storage.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/storage.js.map +1 -1
- package/dist/esm/src/shared/lib/util.d.ts +4 -4
- package/dist/esm/src/shared/lib/util.d.ts.map +1 -1
- package/dist/esm/src/shared/lib/util.js +16 -18
- package/dist/esm/src/shared/lib/util.js.map +1 -1
- package/dist/esm/src/shared/providers/AuthProvider.d.ts.map +1 -1
- package/dist/esm/src/shared/providers/AuthProvider.js +24 -23
- package/dist/esm/src/shared/providers/AuthProvider.js.map +1 -1
- package/dist/esm/src/types.d.ts +2 -2
- package/dist/esm/src/types.d.ts.map +1 -1
- package/dist/esm/src/types.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/src/nextjs/GetUser.d.ts.map +1 -1
- package/dist/src/nextjs/config.d.ts.map +1 -1
- package/dist/src/nextjs/config.js +1 -4
- package/dist/src/nextjs/config.js.map +1 -1
- package/dist/src/nextjs/cookies.d.ts.map +1 -1
- package/dist/src/nextjs/cookies.js +14 -11
- package/dist/src/nextjs/cookies.js.map +1 -1
- package/dist/src/nextjs/index.d.ts.map +1 -1
- package/dist/src/nextjs/routeHandler.d.ts.map +1 -1
- package/dist/src/nextjs/routeHandler.js +1 -5
- package/dist/src/nextjs/routeHandler.js.map +1 -1
- package/dist/src/reactjs/hooks/index.d.ts +0 -1
- package/dist/src/reactjs/hooks/index.d.ts.map +1 -1
- package/dist/src/reactjs/hooks/index.js +0 -1
- package/dist/src/reactjs/hooks/index.js.map +1 -1
- package/dist/src/server/ServerAuthenticationResolver.d.ts.map +1 -1
- package/dist/src/server/ServerAuthenticationResolver.js +2 -7
- package/dist/src/server/ServerAuthenticationResolver.js.map +1 -1
- package/dist/src/server/login.d.ts +2 -2
- package/dist/src/server/login.d.ts.map +1 -1
- package/dist/src/server/login.js +2 -2
- package/dist/src/server/login.js.map +1 -1
- package/dist/src/services/AuthenticationService.d.ts.map +1 -1
- package/dist/src/services/AuthenticationService.js +6 -16
- package/dist/src/services/AuthenticationService.js.map +1 -1
- package/dist/src/shared/components/CivicAuthIframeContainer.d.ts.map +1 -1
- package/dist/src/shared/components/CivicAuthIframeContainer.js +7 -8
- package/dist/src/shared/components/CivicAuthIframeContainer.js.map +1 -1
- package/dist/src/shared/components/LoadingIcon.d.ts.map +1 -1
- package/dist/src/shared/components/LoadingIcon.js +7 -1
- package/dist/src/shared/components/LoadingIcon.js.map +1 -1
- package/dist/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +1 -1
- package/dist/src/shared/lib/GenericAuthenticationRefresher.js +2 -6
- package/dist/src/shared/lib/GenericAuthenticationRefresher.js.map +1 -1
- package/dist/src/shared/lib/UserSession.d.ts.map +1 -1
- package/dist/src/shared/lib/UserSession.js +4 -4
- package/dist/src/shared/lib/UserSession.js.map +1 -1
- package/dist/src/shared/lib/util.d.ts +4 -4
- package/dist/src/shared/lib/util.d.ts.map +1 -1
- package/dist/src/shared/lib/util.js +16 -18
- package/dist/src/shared/lib/util.js.map +1 -1
- package/dist/src/shared/providers/AuthProvider.d.ts.map +1 -1
- package/dist/src/shared/providers/AuthProvider.js +24 -23
- package/dist/src/shared/providers/AuthProvider.js.map +1 -1
- package/dist/test/unit/server/login.test.js +8 -8
- package/dist/test/unit/server/login.test.js.map +1 -1
- package/dist/test/unit/server/session.test.js +4 -4
- package/dist/test/unit/server/session.test.js.map +1 -1
- package/dist/test/unit/services/AuthenticationService.test.js +3 -3
- package/dist/test/unit/services/AuthenticationService.test.js.map +1 -1
- package/dist/test/unit/services/ServerAuthenticationResolver.test.js +3 -3
- package/dist/test/unit/services/ServerAuthenticationResolver.test.js.map +1 -1
- package/dist/test/unit/shared/GenericAuthenticationRefresher.test.js +2 -2
- package/dist/test/unit/shared/GenericAuthenticationRefresher.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/browser/storage.ts +3 -3
- package/src/nextjs/GetUser.ts +3 -3
- package/src/nextjs/config.ts +1 -5
- package/src/nextjs/cookies.ts +14 -18
- package/src/nextjs/index.ts +1 -3
- package/src/nextjs/routeHandler.ts +1 -5
- package/src/reactjs/hooks/index.ts +0 -1
- package/src/server/ServerAuthenticationResolver.ts +2 -7
- package/src/server/login.ts +8 -7
- package/src/services/AuthenticationService.ts +11 -16
- package/src/shared/components/CivicAuthIframeContainer.tsx +12 -11
- package/src/shared/components/LoadingIcon.tsx +9 -1
- package/src/shared/lib/GenericAuthenticationRefresher.ts +3 -8
- package/src/shared/lib/UserSession.ts +6 -6
- package/src/shared/lib/session.ts +1 -1
- package/src/shared/lib/storage.ts +2 -2
- package/src/shared/lib/util.ts +17 -19
- package/src/shared/providers/AuthProvider.tsx +34 -27
- package/src/types.ts +2 -2
- package/test/unit/nextjs/getUser.test.ts +8 -8
- package/test/unit/publicApi/__snapshots__/apiSnapshot.test.ts.snap +0 -1
- package/test/unit/server/login.test.ts +16 -14
- package/test/unit/server/session.test.ts +4 -4
- package/test/unit/services/AuthenticationService.test.ts +3 -3
- package/test/unit/services/ServerAuthenticationResolver.test.ts +11 -6
- package/test/unit/shared/GenericAuthenticationRefresher.test.ts +4 -4
- package/test/unit/shared/UserSession.test.ts +6 -6
- package/test/unit/shared/storage.test.ts +6 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/browser/storage.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/browser/storage.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/browser/storage.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/browser/storage.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/config.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/config.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/config.js +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/config.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/constants.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/constants.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/constants.js +0 -26
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/constants.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/index.d.ts +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/index.js +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/cookies.d.ts +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/cookies.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/cookies.js +0 -26
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/cookies.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/jwt.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/jwt.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/jwt.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/jwt.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/logger.d.ts +0 -26
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/logger.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/logger.js +0 -60
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/logger.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/oauth.d.ts +0 -19
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/oauth.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/oauth.js +0 -67
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/oauth.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/postMessage.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/postMessage.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/postMessage.js +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/postMessage.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/windowUtil.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/windowUtil.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/windowUtil.js +0 -34
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/lib/windowUtil.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/GetUser.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/GetUser.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/GetUser.js +0 -22
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/GetUser.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/client/index.d.ts +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/client/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/client/index.js +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/client/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/config.d.ts +0 -178
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/config.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/config.js +0 -169
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/config.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/cookies.d.ts +0 -30
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/cookies.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/cookies.js +0 -116
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/cookies.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/index.d.ts +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/index.js +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useTokenCookie.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useTokenCookie.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useTokenCookie.js +0 -41
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useTokenCookie.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useUserCookie.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useUserCookie.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useUserCookie.js +0 -40
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/hooks/useUserCookie.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/index.d.ts +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/index.js +0 -20
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware/index.d.ts +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware/index.js +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware.d.ts +0 -59
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware.js +0 -114
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/middleware.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/providers/NextAuthProvider.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/providers/NextAuthProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/providers/NextAuthProvider.js +0 -54
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/providers/NextAuthProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/routeHandler.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/routeHandler.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/routeHandler.js +0 -221
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/routeHandler.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/utils.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/utils.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/utils.js +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/nextjs/utils.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignInButton.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignInButton.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignInButton.js +0 -14
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignInButton.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignOutButton.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignOutButton.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignOutButton.js +0 -14
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/SignOutButton.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/UserButton.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/UserButton.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/UserButton.js +0 -62
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/UserButton.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/index.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/index.js +0 -14
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/components/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/index.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/index.js +0 -20
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useAuth.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useAuth.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useAuth.js +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useAuth.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useUser.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useUser.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useUser.js +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/hooks/useUser.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/index.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/index.js +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/providers/index.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/providers/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/providers/index.js +0 -19
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/reactjs/providers/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/ServerAuthenticationResolver.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/ServerAuthenticationResolver.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/ServerAuthenticationResolver.js +0 -66
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/ServerAuthenticationResolver.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/config.d.ts +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/config.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/config.js +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/config.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/index.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/index.js +0 -14
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/login.d.ts +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/login.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/login.js +0 -42
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/login.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/refresh.d.ts +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/refresh.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/refresh.js +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/server/refresh.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/AuthenticationService.d.ts +0 -87
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/AuthenticationService.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/AuthenticationService.js +0 -228
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/AuthenticationService.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/PKCE.d.ts +0 -20
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/PKCE.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/PKCE.js +0 -50
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/PKCE.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/types.d.ts +0 -23
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/types.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/types.js +0 -11
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/services/types.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframe.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframe.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframe.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframe.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframeContainer.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframeContainer.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframeContainer.js +0 -96
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CivicAuthIframeContainer.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CloseIcon.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CloseIcon.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CloseIcon.js +0 -10
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/CloseIcon.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/LoadingIcon.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/LoadingIcon.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/LoadingIcon.js +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/components/LoadingIcon.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/index.d.ts +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/index.js +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useAuth.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useAuth.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useAuth.js +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useAuth.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useConfig.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useConfig.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useConfig.js +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useConfig.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useIframe.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useIframe.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useIframe.js +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useIframe.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useSession.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useSession.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useSession.js +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useSession.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useToken.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useToken.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useToken.js +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/hooks/useToken.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.d.ts +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/GenericAuthenticationRefresher.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/UserSession.d.ts +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/UserSession.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/UserSession.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/session.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/session.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/session.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/storage.d.ts +0 -25
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/storage.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/storage.js +0 -21
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/storage.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/types.d.ts +0 -22
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/types.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/types.js +0 -19
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/types.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/util.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/lib/util.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthContext.d.ts +0 -10
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthContext.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthContext.js +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthContext.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthProvider.d.ts +0 -20
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/AuthProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/CivicAuthProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/CivicAuthProvider.js +0 -19
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/CivicAuthProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/ConfigProvider.d.ts +0 -21
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/ConfigProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/ConfigProvider.js +0 -24
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/ConfigProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/IframeProvider.d.ts +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/IframeProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/IframeProvider.js +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/IframeProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/SessionProvider.d.ts +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/SessionProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/SessionProvider.js +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/SessionProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/TokenProvider.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/TokenProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/TokenProvider.js +0 -58
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/TokenProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/UserProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/shared/providers/UserProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/types.d.ts +0 -146
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/types.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/types.js +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/types.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/utils.d.ts +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/utils.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/utils.js +0 -53
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/src/utils.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/browser/storage.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/browser/storage.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/browser/storage.js +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/browser/storage.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/config.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/config.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/config.js +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/config.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/constants.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/constants.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/constants.js +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/constants.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/index.d.ts +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/index.js +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/cookies.d.ts +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/cookies.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/cookies.js +0 -23
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/cookies.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/jwt.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/jwt.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/jwt.js +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/jwt.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/logger.d.ts +0 -26
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/logger.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/logger.js +0 -55
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/logger.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/oauth.d.ts +0 -19
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/oauth.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/oauth.js +0 -60
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/oauth.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/postMessage.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/postMessage.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/postMessage.js +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/postMessage.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/windowUtil.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/windowUtil.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/windowUtil.js +0 -30
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/lib/windowUtil.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/GetUser.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/GetUser.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/GetUser.js +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/GetUser.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/client/index.d.ts +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/client/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/client/index.js +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/client/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/config.d.ts +0 -178
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/config.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/config.js +0 -164
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/config.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/cookies.d.ts +0 -30
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/cookies.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/cookies.js +0 -109
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/cookies.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/index.d.ts +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/index.js +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useTokenCookie.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useTokenCookie.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useTokenCookie.js +0 -37
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useTokenCookie.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useUserCookie.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useUserCookie.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useUserCookie.js +0 -36
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/hooks/useUserCookie.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/index.d.ts +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/index.js +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware/index.d.ts +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware/index.js +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware.d.ts +0 -59
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware.js +0 -107
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/middleware.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/providers/NextAuthProvider.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/providers/NextAuthProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/providers/NextAuthProvider.js +0 -50
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/providers/NextAuthProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/routeHandler.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/routeHandler.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/routeHandler.js +0 -216
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/routeHandler.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/utils.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/utils.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/utils.js +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/nextjs/utils.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignInButton.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignInButton.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignInButton.js +0 -10
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignInButton.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignOutButton.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignOutButton.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignOutButton.js +0 -10
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/SignOutButton.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/UserButton.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/UserButton.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/UserButton.js +0 -58
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/UserButton.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/index.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/index.js +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/components/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/index.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/index.js +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useAuth.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useAuth.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useAuth.js +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useAuth.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useUser.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useUser.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useUser.js +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/hooks/useUser.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/index.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/index.js +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/providers/index.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/providers/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/providers/index.js +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/reactjs/providers/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/ServerAuthenticationResolver.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/ServerAuthenticationResolver.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/ServerAuthenticationResolver.js +0 -62
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/ServerAuthenticationResolver.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/config.d.ts +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/config.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/config.js +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/config.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/index.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/index.js +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/login.d.ts +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/login.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/login.js +0 -37
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/login.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/refresh.d.ts +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/refresh.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/refresh.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/server/refresh.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/AuthenticationService.d.ts +0 -87
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/AuthenticationService.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/AuthenticationService.js +0 -222
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/AuthenticationService.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/PKCE.d.ts +0 -20
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/PKCE.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/PKCE.js +0 -44
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/PKCE.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/types.d.ts +0 -23
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/types.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/types.js +0 -7
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/services/types.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframe.d.ts +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframe.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframe.js +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframe.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframeContainer.d.ts +0 -9
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframeContainer.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframeContainer.js +0 -92
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CivicAuthIframeContainer.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CloseIcon.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CloseIcon.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CloseIcon.js +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/CloseIcon.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/LoadingIcon.d.ts +0 -4
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/LoadingIcon.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/LoadingIcon.js +0 -8
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/components/LoadingIcon.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/index.d.ts +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/index.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/index.js +0 -5
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/index.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useAuth.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useAuth.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useAuth.js +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useAuth.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useConfig.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useConfig.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useConfig.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useConfig.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useIframe.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useIframe.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useIframe.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useIframe.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useSession.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useSession.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useSession.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useSession.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useToken.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useToken.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useToken.js +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/hooks/useToken.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/GenericAuthenticationRefresher.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js +0 -43
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/GenericAuthenticationRefresher.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/UserSession.d.ts +0 -12
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/UserSession.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/UserSession.js +0 -20
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/UserSession.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/session.d.ts +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/session.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/session.js +0 -10
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/session.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/storage.d.ts +0 -25
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/storage.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/storage.js +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/storage.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/types.d.ts +0 -22
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/types.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/types.js +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/types.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/util.d.ts +0 -33
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/util.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/util.js +0 -128
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/lib/util.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthContext.d.ts +0 -10
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthContext.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthContext.js +0 -3
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthContext.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthProvider.js +0 -245
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/AuthProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/CivicAuthProvider.d.ts +0 -6
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/CivicAuthProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/CivicAuthProvider.js +0 -15
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/CivicAuthProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/ConfigProvider.d.ts +0 -21
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/ConfigProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/ConfigProvider.js +0 -19
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/ConfigProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/IframeProvider.d.ts +0 -16
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/IframeProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/IframeProvider.js +0 -11
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/IframeProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/SessionProvider.d.ts +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/SessionProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/SessionProvider.js +0 -13
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/SessionProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/TokenProvider.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/TokenProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/TokenProvider.js +0 -53
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/TokenProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/UserProvider.d.ts +0 -18
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/UserProvider.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/UserProvider.js +0 -38
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/shared/providers/UserProvider.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/types.d.ts +0 -146
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/types.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/types.js +0 -2
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/types.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/utils.d.ts +0 -17
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/utils.d.ts.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/utils.js +0 -48
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/src/utils.js.map +0 -1
- package/.rollup.cache/Users/flippie/civic/repos/civic-auth/packages/civic-auth-client/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/.turbo/turbo-lint.log +0 -13
- package/civic-auth-0.0.1-beta.21.tgz +0 -0
- package/dist/cjs/src/nextjs/client/index.d.ts +0 -2
- package/dist/cjs/src/nextjs/client/index.d.ts.map +0 -1
- package/dist/cjs/src/nextjs/client/index.js +0 -6
- package/dist/cjs/src/nextjs/client/index.js.map +0 -1
- package/dist/cjs/src/styles.css +0 -387
- package/dist/esm/src/nextjs/client/index.d.ts +0 -2
- package/dist/esm/src/nextjs/client/index.d.ts.map +0 -1
- package/dist/esm/src/nextjs/client/index.js +0 -2
- package/dist/esm/src/nextjs/client/index.js.map +0 -1
- package/dist/esm/src/styles.css +0 -387
- package/dist/src/browser/storage.d.ts +0 -6
- package/dist/src/browser/storage.d.ts.map +0 -1
- package/dist/src/browser/storage.js +0 -9
- package/dist/src/browser/storage.js.map +0 -1
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -5
- package/dist/src/config.js.map +0 -1
- package/dist/src/constants.d.ts +0 -9
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js +0 -17
- package/dist/src/constants.js.map +0 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/cookies.d.ts +0 -7
- package/dist/src/lib/cookies.d.ts.map +0 -1
- package/dist/src/lib/cookies.js +0 -23
- package/dist/src/lib/cookies.js.map +0 -1
- package/dist/src/lib/jwt.d.ts +0 -3
- package/dist/src/lib/jwt.d.ts.map +0 -1
- package/dist/src/lib/jwt.js +0 -9
- package/dist/src/lib/jwt.js.map +0 -1
- package/dist/src/lib/logger.d.ts +0 -26
- package/dist/src/lib/logger.d.ts.map +0 -1
- package/dist/src/lib/logger.js +0 -55
- package/dist/src/lib/logger.js.map +0 -1
- package/dist/src/lib/oauth.d.ts +0 -19
- package/dist/src/lib/oauth.d.ts.map +0 -1
- package/dist/src/lib/oauth.js +0 -60
- package/dist/src/lib/oauth.js.map +0 -1
- package/dist/src/lib/postMessage.d.ts +0 -4
- package/dist/src/lib/postMessage.d.ts.map +0 -1
- package/dist/src/lib/postMessage.js +0 -15
- package/dist/src/lib/postMessage.js.map +0 -1
- package/dist/src/lib/windowUtil.d.ts +0 -4
- package/dist/src/lib/windowUtil.d.ts.map +0 -1
- package/dist/src/lib/windowUtil.js +0 -30
- package/dist/src/lib/windowUtil.js.map +0 -1
- package/dist/src/nextjs/GetUser.d.ts +0 -6
- package/dist/src/nextjs/GetUser.js +0 -18
- package/dist/src/nextjs/GetUser.js.map +0 -1
- package/dist/src/nextjs/client/index.d.ts +0 -2
- package/dist/src/nextjs/client/index.d.ts.map +0 -1
- package/dist/src/nextjs/client/index.js +0 -2
- package/dist/src/nextjs/client/index.js.map +0 -1
- package/dist/src/nextjs/config.d.ts +0 -178
- package/dist/src/nextjs/cookies.d.ts +0 -30
- package/dist/src/nextjs/hooks/index.d.ts +0 -2
- package/dist/src/nextjs/hooks/index.d.ts.map +0 -1
- package/dist/src/nextjs/hooks/index.js +0 -2
- package/dist/src/nextjs/hooks/index.js.map +0 -1
- package/dist/src/nextjs/hooks/useTokenCookie.d.ts +0 -3
- package/dist/src/nextjs/hooks/useTokenCookie.d.ts.map +0 -1
- package/dist/src/nextjs/hooks/useTokenCookie.js +0 -37
- package/dist/src/nextjs/hooks/useTokenCookie.js.map +0 -1
- package/dist/src/nextjs/hooks/useUserCookie.d.ts +0 -3
- package/dist/src/nextjs/hooks/useUserCookie.d.ts.map +0 -1
- package/dist/src/nextjs/hooks/useUserCookie.js +0 -36
- package/dist/src/nextjs/hooks/useUserCookie.js.map +0 -1
- package/dist/src/nextjs/index.d.ts +0 -7
- package/dist/src/nextjs/index.js +0 -6
- package/dist/src/nextjs/index.js.map +0 -1
- package/dist/src/nextjs/middleware/index.d.ts +0 -2
- package/dist/src/nextjs/middleware/index.d.ts.map +0 -1
- package/dist/src/nextjs/middleware/index.js +0 -2
- package/dist/src/nextjs/middleware/index.js.map +0 -1
- package/dist/src/nextjs/middleware.d.ts +0 -59
- package/dist/src/nextjs/middleware.d.ts.map +0 -1
- package/dist/src/nextjs/middleware.js +0 -107
- package/dist/src/nextjs/middleware.js.map +0 -1
- package/dist/src/nextjs/providers/NextAuthProvider.d.ts +0 -9
- package/dist/src/nextjs/providers/NextAuthProvider.js +0 -50
- package/dist/src/nextjs/providers/NextAuthProvider.js.map +0 -1
- package/dist/src/nextjs/routeHandler.d.ts +0 -18
- package/dist/src/nextjs/utils.d.ts +0 -3
- package/dist/src/nextjs/utils.d.ts.map +0 -1
- package/dist/src/nextjs/utils.js +0 -5
- package/dist/src/nextjs/utils.js.map +0 -1
- package/dist/src/reactjs/components/SignInButton.d.ts +0 -8
- package/dist/src/reactjs/components/SignInButton.d.ts.map +0 -1
- package/dist/src/reactjs/components/SignInButton.js +0 -14
- package/dist/src/reactjs/components/SignInButton.js.map +0 -1
- package/dist/src/reactjs/components/SignOutButton.d.ts +0 -6
- package/dist/src/reactjs/components/SignOutButton.d.ts.map +0 -1
- package/dist/src/reactjs/components/SignOutButton.js +0 -14
- package/dist/src/reactjs/components/SignOutButton.js.map +0 -1
- package/dist/src/reactjs/components/UserButton.d.ts +0 -8
- package/dist/src/reactjs/components/UserButton.js +0 -110
- package/dist/src/reactjs/components/UserButton.js.map +0 -1
- package/dist/src/reactjs/components/index.d.ts +0 -6
- package/dist/src/reactjs/components/index.js +0 -6
- package/dist/src/reactjs/components/index.js.map +0 -1
- package/dist/src/reactjs/hooks/useAuth.d.ts +0 -3
- package/dist/src/reactjs/hooks/useAuth.d.ts.map +0 -1
- package/dist/src/reactjs/hooks/useAuth.js +0 -12
- package/dist/src/reactjs/hooks/useAuth.js.map +0 -1
- package/dist/src/reactjs/hooks/useUser.d.ts +0 -4
- package/dist/src/reactjs/hooks/useUser.d.ts.map +0 -1
- package/dist/src/reactjs/hooks/useUser.js +0 -12
- package/dist/src/reactjs/hooks/useUser.js.map +0 -1
- package/dist/src/reactjs/index.d.ts +0 -6
- package/dist/src/reactjs/index.js +0 -8
- package/dist/src/reactjs/index.js.map +0 -1
- package/dist/src/reactjs/providers/index.d.ts +0 -8
- package/dist/src/reactjs/providers/index.js +0 -7
- package/dist/src/reactjs/providers/index.js.map +0 -1
- package/dist/src/server/ServerAuthenticationResolver.d.ts +0 -18
- package/dist/src/server/config.d.ts +0 -16
- package/dist/src/server/config.d.ts.map +0 -1
- package/dist/src/server/config.js +0 -2
- package/dist/src/server/config.js.map +0 -1
- package/dist/src/server/index.d.ts +0 -6
- package/dist/src/server/index.js +0 -5
- package/dist/src/server/index.js.map +0 -1
- package/dist/src/server/refresh.d.ts +0 -7
- package/dist/src/server/refresh.js +0 -13
- package/dist/src/server/refresh.js.map +0 -1
- package/dist/src/services/PKCE.d.ts +0 -20
- package/dist/src/services/types.d.ts +0 -23
- package/dist/src/services/types.d.ts.map +0 -1
- package/dist/src/services/types.js +0 -7
- package/dist/src/services/types.js.map +0 -1
- package/dist/src/shared/components/CivicAuthIframe.d.ts +0 -8
- package/dist/src/shared/components/CivicAuthIframe.d.ts.map +0 -1
- package/dist/src/shared/components/CivicAuthIframe.js +0 -9
- package/dist/src/shared/components/CivicAuthIframe.js.map +0 -1
- package/dist/src/shared/components/CloseIcon.d.ts +0 -4
- package/dist/src/shared/components/CloseIcon.d.ts.map +0 -1
- package/dist/src/shared/components/CloseIcon.js +0 -6
- package/dist/src/shared/components/CloseIcon.js.map +0 -1
- package/dist/src/shared/components/LoadingIcon.d.ts +0 -4
- package/dist/src/shared/hooks/index.d.ts +0 -5
- package/dist/src/shared/hooks/index.d.ts.map +0 -1
- package/dist/src/shared/hooks/index.js +0 -5
- package/dist/src/shared/hooks/index.js.map +0 -1
- package/dist/src/shared/hooks/useAuth.d.ts +0 -3
- package/dist/src/shared/hooks/useAuth.d.ts.map +0 -1
- package/dist/src/shared/hooks/useAuth.js +0 -12
- package/dist/src/shared/hooks/useAuth.js.map +0 -1
- package/dist/src/shared/hooks/useConfig.d.ts +0 -3
- package/dist/src/shared/hooks/useConfig.d.ts.map +0 -1
- package/dist/src/shared/hooks/useConfig.js +0 -13
- package/dist/src/shared/hooks/useConfig.js.map +0 -1
- package/dist/src/shared/hooks/useIframe.d.ts +0 -3
- package/dist/src/shared/hooks/useIframe.d.ts.map +0 -1
- package/dist/src/shared/hooks/useIframe.js +0 -13
- package/dist/src/shared/hooks/useIframe.js.map +0 -1
- package/dist/src/shared/hooks/useSession.d.ts +0 -3
- package/dist/src/shared/hooks/useSession.d.ts.map +0 -1
- package/dist/src/shared/hooks/useSession.js +0 -13
- package/dist/src/shared/hooks/useSession.js.map +0 -1
- package/dist/src/shared/hooks/useToken.d.ts +0 -3
- package/dist/src/shared/hooks/useToken.d.ts.map +0 -1
- package/dist/src/shared/hooks/useToken.js +0 -12
- package/dist/src/shared/hooks/useToken.js.map +0 -1
- package/dist/src/shared/lib/GenericAuthenticationRefresher.d.ts +0 -15
- package/dist/src/shared/lib/UserSession.d.ts +0 -12
- package/dist/src/shared/lib/session.d.ts +0 -3
- package/dist/src/shared/lib/session.js +0 -10
- package/dist/src/shared/lib/session.js.map +0 -1
- package/dist/src/shared/lib/storage.d.ts +0 -25
- package/dist/src/shared/lib/storage.d.ts.map +0 -1
- package/dist/src/shared/lib/storage.js +0 -17
- package/dist/src/shared/lib/storage.js.map +0 -1
- package/dist/src/shared/lib/types.d.ts +0 -22
- package/dist/src/shared/lib/types.d.ts.map +0 -1
- package/dist/src/shared/lib/types.js +0 -16
- package/dist/src/shared/lib/types.js.map +0 -1
- package/dist/src/shared/providers/AuthContext.d.ts +0 -10
- package/dist/src/shared/providers/AuthContext.d.ts.map +0 -1
- package/dist/src/shared/providers/AuthContext.js +0 -3
- package/dist/src/shared/providers/AuthContext.js.map +0 -1
- package/dist/src/shared/providers/CivicAuthProvider.d.ts +0 -6
- package/dist/src/shared/providers/CivicAuthProvider.js +0 -15
- package/dist/src/shared/providers/CivicAuthProvider.js.map +0 -1
- package/dist/src/shared/providers/ConfigProvider.d.ts +0 -21
- package/dist/src/shared/providers/ConfigProvider.d.ts.map +0 -1
- package/dist/src/shared/providers/ConfigProvider.js +0 -19
- package/dist/src/shared/providers/ConfigProvider.js.map +0 -1
- package/dist/src/shared/providers/IframeProvider.d.ts +0 -16
- package/dist/src/shared/providers/IframeProvider.d.ts.map +0 -1
- package/dist/src/shared/providers/IframeProvider.js +0 -11
- package/dist/src/shared/providers/IframeProvider.js.map +0 -1
- package/dist/src/shared/providers/SessionProvider.d.ts +0 -13
- package/dist/src/shared/providers/SessionProvider.d.ts.map +0 -1
- package/dist/src/shared/providers/SessionProvider.js +0 -13
- package/dist/src/shared/providers/SessionProvider.js.map +0 -1
- package/dist/src/shared/providers/TokenProvider.d.ts +0 -18
- package/dist/src/shared/providers/TokenProvider.d.ts.map +0 -1
- package/dist/src/shared/providers/TokenProvider.js +0 -53
- package/dist/src/shared/providers/TokenProvider.js.map +0 -1
- package/dist/src/shared/providers/UserProvider.d.ts +0 -18
- package/dist/src/shared/providers/UserProvider.d.ts.map +0 -1
- package/dist/src/shared/providers/UserProvider.js +0 -38
- package/dist/src/shared/providers/UserProvider.js.map +0 -1
- package/dist/src/types.d.ts +0 -146
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils.d.ts +0 -15
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/utils.js +0 -43
- package/dist/src/utils.js.map +0 -1
- package/dist/test/integration/sdk.test.d.ts +0 -2
- package/dist/test/integration/sdk.test.js +0 -183
- package/dist/test/integration/sdk.test.js.map +0 -1
- package/dist/test/support/fixtures.d.ts +0 -26
- package/dist/test/support/fixtures.d.ts.map +0 -1
- package/dist/test/support/fixtures.js +0 -55
- package/dist/test/support/fixtures.js.map +0 -1
- package/dist/test/support/tokens.json +0 -26
- package/dist/test/unit/lib/oauth.test.d.ts +0 -2
- package/dist/test/unit/lib/oauth.test.d.ts.map +0 -1
- package/dist/test/unit/lib/oauth.test.js +0 -55
- package/dist/test/unit/lib/oauth.test.js.map +0 -1
- package/dist/test/unit/logger.test.d.ts +0 -2
- package/dist/test/unit/logger.test.d.ts.map +0 -1
- package/dist/test/unit/logger.test.js +0 -141
- package/dist/test/unit/logger.test.js.map +0 -1
- package/dist/test/unit/nextjs/NextAuthProvider.test.d.ts +0 -2
- package/dist/test/unit/nextjs/NextAuthProvider.test.js +0 -29
- package/dist/test/unit/nextjs/NextAuthProvider.test.js.map +0 -1
- package/dist/test/unit/nextjs/config.test.d.ts +0 -2
- package/dist/test/unit/nextjs/config.test.d.ts.map +0 -1
- package/dist/test/unit/nextjs/config.test.js +0 -189
- package/dist/test/unit/nextjs/config.test.js.map +0 -1
- package/dist/test/unit/nextjs/getUser.test.d.ts +0 -2
- package/dist/test/unit/nextjs/getUser.test.js +0 -36
- package/dist/test/unit/nextjs/getUser.test.js.map +0 -1
- package/dist/test/unit/nextjs/middleware.test.d.ts +0 -2
- package/dist/test/unit/nextjs/middleware.test.d.ts.map +0 -1
- package/dist/test/unit/nextjs/middleware.test.js +0 -113
- package/dist/test/unit/nextjs/middleware.test.js.map +0 -1
- package/dist/test/unit/nextjs/routeHandler.test.d.ts +0 -2
- package/dist/test/unit/nextjs/routeHandler.test.d.ts.map +0 -1
- package/dist/test/unit/nextjs/routeHandler.test.js +0 -271
- package/dist/test/unit/nextjs/routeHandler.test.js.map +0 -1
- package/dist/test/unit/nextjs/utils.test.d.ts +0 -2
- package/dist/test/unit/nextjs/utils.test.d.ts.map +0 -1
- package/dist/test/unit/nextjs/utils.test.js +0 -13
- package/dist/test/unit/nextjs/utils.test.js.map +0 -1
- package/dist/test/unit/publicApi/apiSnapshot.test.d.ts +0 -2
- package/dist/test/unit/publicApi/apiSnapshot.test.js +0 -10
- package/dist/test/unit/publicApi/apiSnapshot.test.js.map +0 -1
- package/dist/test/unit/react/components/SignInButton.test.d.ts +0 -2
- package/dist/test/unit/react/components/SignInButton.test.js +0 -31
- package/dist/test/unit/react/components/SignInButton.test.js.map +0 -1
- package/dist/test/unit/react/components/SignOutButton.test.d.ts +0 -2
- package/dist/test/unit/react/components/SignOutButton.test.js +0 -30
- package/dist/test/unit/react/components/SignOutButton.test.js.map +0 -1
- package/dist/test/unit/server/login.test.d.ts +0 -2
- package/dist/test/unit/server/session.test.d.ts +0 -2
- package/dist/test/unit/services/AuthenticationService.test.d.ts +0 -2
- package/dist/test/unit/services/ServerAuthenticationResolver.test.d.ts +0 -2
- package/dist/test/unit/shared/GenericAuthenticationRefresher.test.d.ts +0 -2
- package/dist/test/unit/shared/UserSession.test.d.ts +0 -2
- package/dist/test/unit/shared/UserSession.test.d.ts.map +0 -1
- package/dist/test/unit/shared/UserSession.test.js +0 -37
- package/dist/test/unit/shared/UserSession.test.js.map +0 -1
- package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.d.ts +0 -2
- package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.js +0 -120
- package/dist/test/unit/shared/components/CivicAuthIframeContainer.test.js.map +0 -1
- package/dist/test/unit/shared/storage.test.d.ts +0 -2
- package/dist/test/unit/shared/storage.test.d.ts.map +0 -1
- package/dist/test/unit/shared/storage.test.js +0 -53
- package/dist/test/unit/shared/storage.test.js.map +0 -1
- package/dist/test/unit/utils.test.d.ts +0 -2
- package/dist/test/unit/utils.test.d.ts.map +0 -1
- package/dist/test/unit/utils.test.js +0 -40
- package/dist/test/unit/utils.test.js.map +0 -1
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -40
- package/dist/vitest.config.js.map +0 -1
|
@@ -2,25 +2,24 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.UserContext = exports.UserProvider = void 0;
|
|
5
|
-
const
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_1 = require("react");
|
|
7
6
|
const react_query_1 = require("@tanstack/react-query");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
7
|
+
const useAuth_1 = require("../shared/hooks/useAuth");
|
|
8
|
+
const useToken_1 = require("../shared/hooks/useToken");
|
|
9
|
+
const useSession_1 = require("../shared/hooks/useSession");
|
|
10
|
+
const UserSession_1 = require("../shared/UserSession");
|
|
12
11
|
const UserContext = (0, react_1.createContext)(null);
|
|
13
12
|
exports.UserContext = UserContext;
|
|
14
13
|
const UserProvider = ({ children, storage, user: inputUser, signOut: inputSignOut, }) => {
|
|
15
|
-
const { isLoading: authLoading, error: authError } = (0,
|
|
16
|
-
const session = (0,
|
|
17
|
-
const { accessToken, idToken } = (0,
|
|
18
|
-
const { signIn, signOut } = (0,
|
|
14
|
+
const { isLoading: authLoading, error: authError } = (0, useAuth_1.useAuth)();
|
|
15
|
+
const session = (0, useSession_1.useSession)();
|
|
16
|
+
const { accessToken, idToken } = (0, useToken_1.useToken)();
|
|
17
|
+
const { signIn, signOut } = (0, useAuth_1.useAuth)();
|
|
19
18
|
const fetchUser = async () => {
|
|
20
19
|
if (!accessToken) {
|
|
21
20
|
return null;
|
|
22
21
|
}
|
|
23
|
-
const userSession = new
|
|
22
|
+
const userSession = new UserSession_1.GenericUserSession(storage);
|
|
24
23
|
return userSession.get();
|
|
25
24
|
};
|
|
26
25
|
const { data: user, isLoading: userLoading, error: userError, } = (0, react_query_1.useQuery)({
|
|
@@ -31,7 +30,7 @@ const UserProvider = ({ children, storage, user: inputUser, signOut: inputSignOu
|
|
|
31
30
|
const isLoading = authLoading || userLoading;
|
|
32
31
|
const error = authError || userError;
|
|
33
32
|
const userWithIdToken = user ? { ...user, idToken } : null;
|
|
34
|
-
return (
|
|
33
|
+
return (React.createElement(UserContext.Provider, { value: {
|
|
35
34
|
user: (inputUser || userWithIdToken) ?? null,
|
|
36
35
|
isLoading,
|
|
37
36
|
error,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserProvider.js","sourceRoot":"","sources":["../../../../src/shared/UserProvider.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AACb,iCAAiD;AACjD,uDAAiE;AAGjE,oDAAiD;AACjD,sDAAmD;AACnD,0DAAuD;AAEvD,sDAA0D;AAS1D,MAAM,WAAW,GAAG,IAAA,qBAAa,EAAyB,IAAI,CAAC,CAAC;AA0DzC,kCAAW;AAxDlC,MAAM,YAAY,GAAG,CAAwB,EAC3C,QAAQ,EACR,OAAO,EACP,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,YAAY,GAMtB,EAAE,EA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IAEA,QAAQ,CACY,CACxB,CAAC;AACJ,CAAC,CAAC;AAIO,oCAAY","sourcesContent":["\"use client\";\nimport { createContext, ReactNode } from \"react\";\nimport { useQuery, UseQueryResult } from \"@tanstack/react-query\";\nimport { JWT } from \"oslo/jwt\";\nimport { AuthStorage, EmptyObject, User } from \"@/types.js\";\nimport { useAuth } from \"@/shared/hooks/useAuth\";\nimport { useToken } from \"@/shared/hooks/useToken\";\nimport { useSession } from \"@/shared/hooks/useSession\";\nimport { AuthContextType } from \"@/shared/AuthContext\";\nimport { GenericUserSession } from \"@/shared/UserSession\";\n\ntype UserContextType<\n T extends Record<string, unknown> & JWT[\"payload\"] = Record<string, unknown> &\n JWT[\"payload\"],\n> = {\n user: User<T> | null;\n} & Omit<AuthContextType, \"isAuthenticated\">;\n\nconst UserContext = createContext<UserContextType | null>(null);\n\nconst UserProvider = <T extends EmptyObject>({\n children,\n storage,\n user: inputUser,\n signOut: inputSignOut,\n}: {\n children: ReactNode;\n storage: AuthStorage;\n user?: User<T> | null;\n signOut?: () => Promise<void>;\n}) => {\n const { isLoading: authLoading, error: authError } = useAuth();\n const session = useSession();\n const { accessToken, idToken } = useToken();\n const { signIn, signOut } = useAuth();\n\n const fetchUser = async (): Promise<User | null> => {\n if (!accessToken) {\n return null;\n }\n const userSession = new GenericUserSession(storage);\n return userSession.get();\n };\n\n const {\n data: user,\n isLoading: userLoading,\n error: userError,\n }: UseQueryResult<User<T> | null, Error> = useQuery({\n queryKey: [\"user\", session?.idToken],\n queryFn: fetchUser,\n enabled: !!session?.idToken, // Only run the query if we have an access token\n });\n\n const isLoading = authLoading || userLoading;\n const error = authError || userError;\n\n const userWithIdToken = user ? { ...user, idToken } : null;\n\n return (\n <UserContext.Provider\n value={{\n user: (inputUser || userWithIdToken) ?? null,\n isLoading,\n error,\n signIn,\n signOut: inputSignOut || signOut,\n }}\n >\n {children}\n </UserContext.Provider>\n );\n};\n\nexport type { UserContextType };\n\nexport { UserProvider, UserContext };\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AuthStorage, User } from "../types.js";
|
|
2
|
+
export interface UserSession {
|
|
3
|
+
get(): Promise<User | null>;
|
|
4
|
+
set(user: User): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export declare class GenericUserSession implements UserSession {
|
|
7
|
+
readonly storage: AuthStorage;
|
|
8
|
+
constructor(storage: AuthStorage);
|
|
9
|
+
get(): Promise<User | null>;
|
|
10
|
+
set(user: User | null): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=UserSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSession.d.ts","sourceRoot":"","sources":["../../../../src/shared/UserSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsB,IAAI,EAAE,MAAM,YAAY,CAAC;AAInE,MAAM,WAAW,WAAW;IAC1B,GAAG,IAAI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAC5B,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,qBAAa,kBAAmB,YAAW,WAAW;IACxC,QAAQ,CAAC,OAAO,EAAE,WAAW;gBAApB,OAAO,EAAE,WAAW;IAEnC,GAAG,IAAI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK3B,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAO5C"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GenericUserSession = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
const jwt_1 = require("../lib/jwt");
|
|
6
6
|
class GenericUserSession {
|
|
7
7
|
storage;
|
|
8
8
|
constructor(storage) {
|
|
9
9
|
this.storage = storage;
|
|
10
10
|
}
|
|
11
|
-
get() {
|
|
12
|
-
const user = this.storage.get(
|
|
11
|
+
async get() {
|
|
12
|
+
const user = await this.storage.get(types_1.UserStorage.USER);
|
|
13
13
|
return user ? JSON.parse(user) : null;
|
|
14
14
|
}
|
|
15
|
-
set(user) {
|
|
15
|
+
async set(user) {
|
|
16
16
|
const forwardedTokens = user?.forwardedTokens
|
|
17
|
-
? (0,
|
|
17
|
+
? (0, jwt_1.convertForwardedTokenFormat)(user?.forwardedTokens)
|
|
18
18
|
: null;
|
|
19
19
|
const value = user ? JSON.stringify({ ...user, forwardedTokens }) : "";
|
|
20
|
-
this.storage.set(
|
|
20
|
+
this.storage.set(types_1.UserStorage.USER, value);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.GenericUserSession = GenericUserSession;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSession.js","sourceRoot":"","sources":["../../../../src/shared/UserSession.ts"],"names":[],"mappings":";;;AACA,mCAAsC;AACtC,mCAAwD;AAOxD,MAAa,kBAAkB;IACR;IAArB,YAAqB,OAAoB;QAApB,YAAO,GAAP,OAAO,CAAa;IAAG,CAAC;IAE7C,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAW,CAAC,IAAI,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAiB;QACzB,MAAM,eAAe,GAAG,IAAI,EAAE,eAAe;YAC3C,CAAC,CAAC,IAAA,iCAA2B,EAAC,IAAI,EAAE,eAAqC,CAAC;YAC1E,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACF;AAfD,gDAeC","sourcesContent":["import { AuthStorage, ForwardedTokensJWT, User } from \"@/types.js\";\nimport { UserStorage } from \"./types\";\nimport { convertForwardedTokenFormat } from \"@/lib/jwt\";\n\nexport interface UserSession {\n get(): Promise<User | null>;\n set(user: User): Promise<void>;\n}\n\nexport class GenericUserSession implements UserSession {\n constructor(readonly storage: AuthStorage) {}\n\n async get(): Promise<User | null> {\n const user = await this.storage.get(UserStorage.USER);\n return user ? JSON.parse(user) : null;\n }\n\n async set(user: User | null): Promise<void> {\n const forwardedTokens = user?.forwardedTokens\n ? convertForwardedTokenFormat(user?.forwardedTokens as ForwardedTokensJWT)\n : null;\n const value = user ? JSON.stringify({ ...user, forwardedTokens }) : \"\";\n this.storage.set(UserStorage.USER, value);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CivicAuthIframeContainer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,KAAK,6BAA6B,GAAG;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAuEF,QAAA,MAAM,wBAAwB,kCAG3B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"CivicAuthIframeContainer.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,KAAK,6BAA6B,GAAG;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAuEF,QAAA,MAAM,wBAAwB,kCAG3B,6BAA6B,sBAwG/B,CAAC;AAEF,YAAY,EAAE,6BAA6B,EAAE,CAAC;AAE9C,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -92,7 +92,6 @@ const CivicAuthIframeContainer = ({ onClose, closeOnRedirect = true, }) => {
|
|
|
92
92
|
// On the initial (3rd party) redirect from the auth server, the cookie won't be sent, so the server-side callback route will just render a blank page,
|
|
93
93
|
// and we'll do the exchange request from here, which will include the cookies.
|
|
94
94
|
if (iframeBody.includes(constants_js_1.TOKEN_EXCHANGE_TRIGGER_TEXT)) {
|
|
95
|
-
console.log(`${constants_js_1.TOKEN_EXCHANGE_TRIGGER_TEXT}, calling callback URL again...`);
|
|
96
95
|
const params = new URL(iframeUrl).searchParams;
|
|
97
96
|
const appUrl = globalThis.window?.location?.origin;
|
|
98
97
|
fetch(`${config.redirectUrl}?${params.toString()}&appUrl=${appUrl}`);
|
|
@@ -131,17 +130,17 @@ const CivicAuthIframeContainer = ({ onClose, closeOnRedirect = true, }) => {
|
|
|
131
130
|
window.addEventListener("keydown", handleEscape);
|
|
132
131
|
return () => window.removeEventListener("keydown", handleEscape);
|
|
133
132
|
});
|
|
134
|
-
const handleIframeLoad = () => {
|
|
133
|
+
const handleIframeLoad = (0, react_1.useCallback)(() => {
|
|
135
134
|
setIsLoading(false);
|
|
136
|
-
|
|
137
|
-
if (
|
|
135
|
+
const iframeHasUrl = processIframeUrl();
|
|
136
|
+
if (iframeHasUrl && intervalId.current) {
|
|
138
137
|
clearInterval(intervalId.current);
|
|
139
138
|
}
|
|
140
|
-
};
|
|
141
|
-
const showLoadingIcon = isLoading || isAuthLoading
|
|
139
|
+
}, [processIframeUrl, setIsLoading, intervalId]);
|
|
140
|
+
const showLoadingIcon = isLoading || isAuthLoading;
|
|
142
141
|
const WrapperComponent = config.modalIframe ? IframeChrome : NoChrome;
|
|
143
142
|
return (react_1.default.createElement(WrapperComponent, { onClose: onClose },
|
|
144
|
-
showLoadingIcon
|
|
143
|
+
showLoadingIcon ? (react_1.default.createElement("div", { id: "civic-auth-loading-icon-wrapper", style: {
|
|
145
144
|
position: "absolute",
|
|
146
145
|
inset: 0,
|
|
147
146
|
display: "flex",
|
|
@@ -149,7 +148,7 @@ const CivicAuthIframeContainer = ({ onClose, closeOnRedirect = true, }) => {
|
|
|
149
148
|
justifyContent: "center",
|
|
150
149
|
backgroundColor: "white",
|
|
151
150
|
} },
|
|
152
|
-
react_1.default.createElement(LoadingIcon_js_1.LoadingIcon, null))),
|
|
151
|
+
react_1.default.createElement(LoadingIcon_js_1.LoadingIcon, null))) : null,
|
|
153
152
|
react_1.default.createElement(CivicAuthIframe_js_1.CivicAuthIframe, { ref: iframeRef, onLoad: handleIframeLoad })));
|
|
154
153
|
};
|
|
155
154
|
exports.CivicAuthIframeContainer = CivicAuthIframeContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CivicAuthIframeContainer.js","sourceRoot":"","sources":["../../../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,+CAAwE;AACxE,uEAAiE;AACjE,mEAA6D;AAC7D,+EAAyE;AACzE,sDAAwE;AACxE,iDAA6D;AAO7D,SAAS,QAAQ,CAAC,EAChB,QAAQ,GAIT;IACC,OAAO,uCAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAG,QAAQ,CAAO,CAAC;AAChE,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,QAAQ,EACR,OAAO,GAIR;IACC,OAAO,CACL,uCACE,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,OA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C;gBACR,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,QAAQ;gBACxB,eAAe,EAAE,OAAO;aACzB;YAED,8BAAC,4BAAW,OAAG,CACX,CACP;QAED,8BAAC,oCAAe,IAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAI,CAC5C,CACpB,CAAC;AACJ,CAAC,CAAC;AAIO,4DAAwB","sourcesContent":["\"use client\";\n\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { LoadingIcon } from \"@/shared/components/LoadingIcon.js\";\nimport { CloseIcon } from \"@/shared/components/CloseIcon.js\";\nimport { CivicAuthIframe } from \"@/shared/components/CivicAuthIframe.js\";\nimport { useAuth, useConfig, useIframe } from \"@/shared/hooks/index.js\";\nimport { TOKEN_EXCHANGE_TRIGGER_TEXT } from \"@/constants.js\";\n\ntype CivicAuthIframeContainerProps = {\n onClose?: () => void;\n closeOnRedirect?: boolean;\n};\n\nfunction NoChrome({\n children,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n}) {\n return <div style={{ position: \"relative\" }}>{children}</div>;\n}\n\nfunction IframeChrome({\n children,\n onClose,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n zIndex: 50,\n display: \"flex\",\n height: \"100vh\",\n width: \"100vw\",\n minWidth: \"18rem\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(17, 24, 39, 0.5)\",\n }}\n onClick={onClose}\n >\n <div\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: \"1.5rem\",\n backgroundColor: \"white\",\n padding: \"1.5rem\",\n boxShadow:\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n }}\n onClick={(e) => e.stopPropagation()}\n >\n <button\n style={{\n position: \"absolute\",\n right: \"1rem\",\n top: \"1rem\",\n display: \"flex\",\n cursor: \"pointer\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: \"none\",\n backgroundColor: \"transparent\",\n padding: \"0.25rem\",\n color: \"#9ca3af\",\n }}\n onClick={onClose}\n >\n <CloseIcon />\n </button>\n\n {children}\n </div>\n </div>\n );\n}\nconst CivicAuthIframeContainer = ({\n onClose,\n closeOnRedirect = true,\n}: CivicAuthIframeContainerProps) => {\n const [isLoading, setIsLoading] = useState(true);\n const { isLoading: isAuthLoading } = useAuth();\n const config = useConfig();\n const { setAuthResponseUrl, iframeRef } = useIframe();\n const processIframeUrl = useCallback(() => {\n if (iframeRef && iframeRef.current && iframeRef.current.contentWindow) {\n try {\n const iframeUrl = iframeRef.current.contentWindow.location.href;\n // we know that oauth has finished when the iframe redirects to our redirectUrl\n if (iframeUrl.startsWith(config.redirectUrl)) {\n // we still want to show the spinner during redirect\n setIsLoading(true);\n const iframeBody =\n iframeRef.current.contentWindow.document.body.innerHTML;\n\n // If we're doing a server token exchange, we need to call the server a second time\n // using a fetch so that we're on the same domain and cookies can be sent and read\n // The server will use the presence of the code_verifier cookie to determine whether to do a token exchange or not.\n // On the initial (3rd party) redirect from the auth server, the cookie won't be sent, so the server-side callback route will just render a blank page,\n // and we'll do the exchange request from here, which will include the cookies.\n if (iframeBody.includes(TOKEN_EXCHANGE_TRIGGER_TEXT)) {\n console.log(\n `${TOKEN_EXCHANGE_TRIGGER_TEXT}, calling callback URL again...`,\n );\n const params = new URL(iframeUrl).searchParams;\n const appUrl = globalThis.window?.location?.origin;\n fetch(\n `${config.redirectUrl}?${params.toString()}&appUrl=${appUrl}`,\n );\n } else {\n // if we're doing token-exchange in the client, we can just set the authResponseUrl\n // to be handled by the auth provider\n setAuthResponseUrl(iframeUrl);\n }\n\n if (closeOnRedirect) onClose?.();\n return true; // Successfully processed the URL\n }\n } catch {\n // If we get here, the iframe hasn't redirected to our origin yet\n console.log(\"Waiting for redirect...\");\n }\n }\n return false; // Haven't processed the URL yet\n }, [\n closeOnRedirect,\n config.redirectUrl,\n iframeRef,\n onClose,\n setAuthResponseUrl,\n ]);\n\n const intervalId = useRef<NodeJS.Timeout>();\n\n const handleEscape = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose?.();\n }\n },\n [onClose],\n );\n\n // handle Escape\n useEffect(() => {\n window.addEventListener(\"keydown\", handleEscape);\n\n return () => window.removeEventListener(\"keydown\", handleEscape);\n });\n\n const handleIframeLoad = () => {\n setIsLoading(false);\n console.log(\"handleIframeLoad\");\n if (processIframeUrl() && intervalId.current) {\n clearInterval(intervalId.current);\n }\n };\n const showLoadingIcon =\n isLoading || isAuthLoading || !iframeRef?.current?.getAttribute(\"src\");\n\n const WrapperComponent = config.modalIframe ? IframeChrome : NoChrome;\n\n return (\n <WrapperComponent onClose={onClose}>\n {showLoadingIcon && (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"white\",\n }}\n >\n <LoadingIcon />\n </div>\n )}\n\n <CivicAuthIframe ref={iframeRef} onLoad={handleIframeLoad} />\n </WrapperComponent>\n );\n};\n\nexport type { CivicAuthIframeContainerProps };\n\nexport { CivicAuthIframeContainer };\n"]}
|
|
1
|
+
{"version":3,"file":"CivicAuthIframeContainer.js","sourceRoot":"","sources":["../../../../../src/shared/components/CivicAuthIframeContainer.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,+CAAwE;AACxE,uEAAiE;AACjE,mEAA6D;AAC7D,+EAAyE;AACzE,sDAAwE;AACxE,iDAA6D;AAO7D,SAAS,QAAQ,CAAC,EAChB,QAAQ,GAIT;IACC,OAAO,uCAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAG,QAAQ,CAAO,CAAC;AAChE,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,QAAQ,EACR,OAAO,GAIR;IACC,OAAO,CACL,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AAO,CACL,8BAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO;QAC/B,eAAe,CAAC,CAAC,CAAC,CACjB,uCACE,EAAE,EAAC,iCAAiC,EACpC,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,CAAC;gBACR,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,QAAQ;gBACxB,eAAe,EAAE,OAAO;aACzB;YAED,8BAAC,4BAAW,OAAG,CACX,CACP,CAAC,CAAC,CAAC,IAAI;QAER,8BAAC,oCAAe,IAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAI,CAC5C,CACpB,CAAC;AACJ,CAAC,CAAC;AAIO,4DAAwB","sourcesContent":["\"use client\";\n\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { LoadingIcon } from \"@/shared/components/LoadingIcon.js\";\nimport { CloseIcon } from \"@/shared/components/CloseIcon.js\";\nimport { CivicAuthIframe } from \"@/shared/components/CivicAuthIframe.js\";\nimport { useAuth, useConfig, useIframe } from \"@/shared/hooks/index.js\";\nimport { TOKEN_EXCHANGE_TRIGGER_TEXT } from \"@/constants.js\";\n\ntype CivicAuthIframeContainerProps = {\n onClose?: () => void;\n closeOnRedirect?: boolean;\n};\n\nfunction NoChrome({\n children,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n}) {\n return <div style={{ position: \"relative\" }}>{children}</div>;\n}\n\nfunction IframeChrome({\n children,\n onClose,\n}: {\n children: React.ReactNode;\n onClose?: () => void;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n zIndex: 50,\n display: \"flex\",\n height: \"100vh\",\n width: \"100vw\",\n minWidth: \"18rem\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(17, 24, 39, 0.5)\",\n }}\n onClick={onClose}\n >\n <div\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: \"1.5rem\",\n backgroundColor: \"white\",\n padding: \"1.5rem\",\n boxShadow:\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n }}\n onClick={(e) => e.stopPropagation()}\n >\n <button\n style={{\n position: \"absolute\",\n right: \"1rem\",\n top: \"1rem\",\n display: \"flex\",\n cursor: \"pointer\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: \"none\",\n backgroundColor: \"transparent\",\n padding: \"0.25rem\",\n color: \"#9ca3af\",\n }}\n onClick={onClose}\n >\n <CloseIcon />\n </button>\n\n {children}\n </div>\n </div>\n );\n}\nconst CivicAuthIframeContainer = ({\n onClose,\n closeOnRedirect = true,\n}: CivicAuthIframeContainerProps) => {\n const [isLoading, setIsLoading] = useState(true);\n const { isLoading: isAuthLoading } = useAuth();\n const config = useConfig();\n const { setAuthResponseUrl, iframeRef } = useIframe();\n\n const processIframeUrl = useCallback(() => {\n if (iframeRef && iframeRef.current && iframeRef.current.contentWindow) {\n try {\n const iframeUrl = iframeRef.current.contentWindow.location.href;\n // we know that oauth has finished when the iframe redirects to our redirectUrl\n if (iframeUrl.startsWith(config.redirectUrl)) {\n // we still want to show the spinner during redirect\n setIsLoading(true);\n const iframeBody =\n iframeRef.current.contentWindow.document.body.innerHTML;\n\n // If we're doing a server token exchange, we need to call the server a second time\n // using a fetch so that we're on the same domain and cookies can be sent and read\n // The server will use the presence of the code_verifier cookie to determine whether to do a token exchange or not.\n // On the initial (3rd party) redirect from the auth server, the cookie won't be sent, so the server-side callback route will just render a blank page,\n // and we'll do the exchange request from here, which will include the cookies.\n if (iframeBody.includes(TOKEN_EXCHANGE_TRIGGER_TEXT)) {\n const params = new URL(iframeUrl).searchParams;\n const appUrl = globalThis.window?.location?.origin;\n fetch(\n `${config.redirectUrl}?${params.toString()}&appUrl=${appUrl}`,\n );\n } else {\n // if we're doing token-exchange in the client, we can just set the authResponseUrl\n // to be handled by the auth provider\n setAuthResponseUrl(iframeUrl);\n }\n\n if (closeOnRedirect) onClose?.();\n return true; // Successfully processed the URL\n }\n } catch {\n // If we get here, the iframe hasn't redirected to our origin yet\n console.log(\"Waiting for redirect...\");\n }\n }\n return false; // Haven't processed the URL yet\n }, [\n closeOnRedirect,\n config.redirectUrl,\n iframeRef,\n onClose,\n setAuthResponseUrl,\n ]);\n\n const intervalId = useRef<NodeJS.Timeout>();\n\n const handleEscape = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose?.();\n }\n },\n [onClose],\n );\n\n // handle Escape\n useEffect(() => {\n window.addEventListener(\"keydown\", handleEscape);\n\n return () => window.removeEventListener(\"keydown\", handleEscape);\n });\n\n const handleIframeLoad = useCallback(() => {\n setIsLoading(false);\n\n const iframeHasUrl = processIframeUrl();\n\n if (iframeHasUrl && intervalId.current) {\n clearInterval(intervalId.current);\n }\n }, [processIframeUrl, setIsLoading, intervalId]);\n\n const showLoadingIcon = isLoading || isAuthLoading;\n\n const WrapperComponent = config.modalIframe ? IframeChrome : NoChrome;\n\n return (\n <WrapperComponent onClose={onClose}>\n {showLoadingIcon ? (\n <div\n id=\"civic-auth-loading-icon-wrapper\"\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"white\",\n }}\n >\n <LoadingIcon />\n </div>\n ) : null}\n\n <CivicAuthIframe ref={iframeRef} onLoad={handleIframeLoad} />\n </WrapperComponent>\n );\n};\n\nexport type { CivicAuthIframeContainerProps };\n\nexport { CivicAuthIframeContainer };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"LoadingIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,WAAW,yBAgDhB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -5,7 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LoadingIcon = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const LoadingIcon = () => (react_1.default.createElement("div", { role: "status" },
|
|
8
|
+
const LoadingIcon = () => (react_1.default.createElement("div", { id: "civic-auth-loading-icon", role: "status" },
|
|
9
|
+
react_1.default.createElement("style", null, `
|
|
10
|
+
@keyframes spin {
|
|
11
|
+
0% { transform: rotate(0deg); }
|
|
12
|
+
100% { transform: rotate(360deg); }
|
|
13
|
+
}
|
|
14
|
+
`),
|
|
9
15
|
react_1.default.createElement("svg", { "aria-hidden": "true", style: {
|
|
10
16
|
display: "inline",
|
|
11
17
|
height: "2rem",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingIcon.js","sourceRoot":"","sources":["../../../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CACxB,uCAAK,IAAI,EAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"LoadingIcon.js","sourceRoot":"","sources":["../../../../../src/shared/components/LoadingIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CACxB,uCAAK,EAAE,EAAC,yBAAyB,EAAC,IAAI,EAAC,QAAQ;IAC7C,6CACG;;;;;OAKA,CACK;IACR,sDACc,MAAM,EAClB,KAAK,EAAE;YACL,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,yBAAyB;YACpC,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SACjB,EACD,OAAO,EAAC,aAAa,EACrB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B;QAElC,wCACE,CAAC,EAAC,8WAA8W,EAChX,IAAI,EAAC,cAAc,GACnB;QACF,wCACE,CAAC,EAAC,+kBAA+kB,EACjlB,IAAI,EAAC,aAAa,GAClB,CACE;IACN,wCACE,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,QAAQ;YAClB,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,CAAC;SACV,iBAGI,CACH,CACP,CAAC;AAEO,kCAAW","sourcesContent":["import React from \"react\";\n\nconst LoadingIcon = () => (\n <div id=\"civic-auth-loading-icon\" role=\"status\">\n <style>\n {`\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `}\n </style>\n <svg\n aria-hidden=\"true\"\n style={{\n display: \"inline\",\n height: \"2rem\",\n width: \"2rem\",\n animation: \"spin 1s linear infinite\",\n fill: \"#4b5563\",\n color: \"#e5e7eb\",\n }}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span\n style={{\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: 0,\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n border: 0,\n }}\n >\n Loading...\n </span>\n </div>\n);\n\nexport { LoadingIcon };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericAuthenticationRefresher.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/GenericAuthenticationRefresher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAMhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,qBAAa,8BAA+B,YAAW,uBAAuB;IAK1E,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,iBAAiB,CAAC;IAN5B,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,SAAS,CAAwB;IAEzC,OAAO;
|
|
1
|
+
{"version":3,"file":"GenericAuthenticationRefresher.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/GenericAuthenticationRefresher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAMhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,qBAAa,8BAA+B,YAAW,uBAAuB;IAK1E,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,iBAAiB,CAAC;IAN5B,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,SAAS,CAAwB;IAEzC,OAAO;IAMD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;WAkBd,KAAK,CAChB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,WAAW,EACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAWpC,aAAa;CAgBpB"}
|
|
@@ -13,10 +13,6 @@ class GenericAuthenticationRefresher {
|
|
|
13
13
|
this.authConfig = authConfig;
|
|
14
14
|
this.storage = storage;
|
|
15
15
|
this.endpointOverrides = endpointOverrides;
|
|
16
|
-
console.log("GenericAuthenticationRefresher constructor", {
|
|
17
|
-
authConfig,
|
|
18
|
-
endpointOverrides,
|
|
19
|
-
});
|
|
20
16
|
}
|
|
21
17
|
async init() {
|
|
22
18
|
// resolve oauth config
|
|
@@ -34,12 +30,12 @@ class GenericAuthenticationRefresher {
|
|
|
34
30
|
async refreshTokens() {
|
|
35
31
|
if (!this.oauth2client)
|
|
36
32
|
await this.init();
|
|
37
|
-
const tokens = (0, util_js_1.retrieveTokens)(this.storage);
|
|
33
|
+
const tokens = await (0, util_js_1.retrieveTokens)(this.storage);
|
|
38
34
|
if (!tokens?.refresh_token)
|
|
39
35
|
throw new Error("No refresh token available");
|
|
40
36
|
const oauth2Client = this.oauth2client;
|
|
41
37
|
const refreshedTokens = await oauth2Client.refreshAccessToken(tokens.refresh_token);
|
|
42
|
-
(0, util_js_1.storeTokens)(this.storage, refreshedTokens);
|
|
38
|
+
await (0, util_js_1.storeTokens)(this.storage, refreshedTokens);
|
|
43
39
|
return tokens;
|
|
44
40
|
}
|
|
45
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericAuthenticationRefresher.js","sourceRoot":"","sources":["../../../../../src/shared/lib/GenericAuthenticationRefresher.ts"],"names":[],"mappings":";;;AAEA,kDAI8B;AAE9B,wCAA2C;AAE3C,MAAa,8BAA8B;IAK/B;IACA;IACA;IANF,YAAY,CAA2B;IACvC,SAAS,CAAwB;IAEzC,YACU,UAAsB,EACtB,OAAoB,EACpB,iBAAsC;QAFtC,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAa;QACpB,sBAAiB,GAAjB,iBAAiB,CAAqB;
|
|
1
|
+
{"version":3,"file":"GenericAuthenticationRefresher.js","sourceRoot":"","sources":["../../../../../src/shared/lib/GenericAuthenticationRefresher.ts"],"names":[],"mappings":";;;AAEA,kDAI8B;AAE9B,wCAA2C;AAE3C,MAAa,8BAA8B;IAK/B;IACA;IACA;IANF,YAAY,CAA2B;IACvC,SAAS,CAAwB;IAEzC,YACU,UAAsB,EACtB,OAAoB,EACpB,iBAAsC;QAFtC,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAa;QACpB,sBAAiB,GAAjB,iBAAiB,CAAqB;IAC7C,CAAC;IAEJ,KAAK,CAAC,IAAI;QACR,uBAAuB;QACvB,IAAI,CAAC,SAAS,GAAG,MAAM,IAAA,mCAAyB,EAC9C,IAAI,CAAC,UAAU,CAAC,WAAW,EAC3B,IAAI,CAAC,iBAAiB,CACvB,CAAC;QACF,IAAI,CAAC,YAAY,GAAG,IAAI,qBAAY,CAClC,IAAI,CAAC,UAAU,CAAC,QAAQ,EACxB,IAAI,CAAC,SAAS,CAAC,IAAI,EACnB,IAAI,CAAC,SAAS,CAAC,KAAK,EACpB;YACE,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;SACzC,CACF,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAChB,UAAsB,EACtB,OAAoB,EACpB,iBAAsC;QAEtC,MAAM,SAAS,GAAG,IAAI,8BAA8B,CAClD,UAAU,EACV,OAAO,EACP,iBAAiB,CAClB,CAAC;QACF,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;QAEvB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,IAAI,CAAC,IAAI,CAAC,YAAY;YAAE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAE1C,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAc,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,EAAE,aAAa;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAE1E,MAAM,YAAY,GAAG,IAAI,CAAC,YAAa,CAAC;QACxC,MAAM,eAAe,GACnB,MAAM,YAAY,CAAC,kBAAkB,CACnC,MAAM,CAAC,aAAa,CACrB,CAAC;QAEJ,MAAM,IAAA,qBAAW,EAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAEjD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA3DD,wEA2DC","sourcesContent":["import type { AuthenticationRefresher } from \"@/services/types.js\";\nimport type { AuthStorage, Endpoints, OIDCTokenResponseBody } from \"@/types.js\";\nimport {\n getEndpointsWithOverrides,\n retrieveTokens,\n storeTokens,\n} from \"@/shared/lib/util.js\";\nimport type { AuthConfig } from \"@/server/config.js\";\nimport { OAuth2Client } from \"oslo/oauth2\";\n\nexport class GenericAuthenticationRefresher implements AuthenticationRefresher {\n private oauth2client: OAuth2Client | undefined;\n private endpoints: Endpoints | undefined;\n\n private constructor(\n private authConfig: AuthConfig,\n private storage: AuthStorage,\n private endpointOverrides?: Partial<Endpoints>,\n ) {}\n\n async init(): Promise<this> {\n // resolve oauth config\n this.endpoints = await getEndpointsWithOverrides(\n this.authConfig.oauthServer,\n this.endpointOverrides,\n );\n this.oauth2client = new OAuth2Client(\n this.authConfig.clientId,\n this.endpoints.auth,\n this.endpoints.token,\n {\n redirectURI: this.authConfig.redirectUrl,\n },\n );\n\n return this;\n }\n\n static async build(\n authConfig: AuthConfig,\n storage: AuthStorage,\n endpointOverrides?: Partial<Endpoints>,\n ): Promise<GenericAuthenticationRefresher> {\n const refresher = new GenericAuthenticationRefresher(\n authConfig,\n storage,\n endpointOverrides,\n );\n await refresher.init();\n\n return refresher;\n }\n\n async refreshTokens() {\n if (!this.oauth2client) await this.init();\n\n const tokens = await retrieveTokens(this.storage);\n if (!tokens?.refresh_token) throw new Error(\"No refresh token available\");\n\n const oauth2Client = this.oauth2client!;\n const refreshedTokens =\n await oauth2Client.refreshAccessToken<OIDCTokenResponseBody>(\n tokens.refresh_token,\n );\n\n await storeTokens(this.storage, refreshedTokens);\n\n return tokens;\n }\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AuthStorage, User } from "../../types.js";
|
|
2
2
|
export interface UserSession {
|
|
3
|
-
get(): User | null
|
|
4
|
-
set(user: User): void
|
|
3
|
+
get(): Promise<User | null>;
|
|
4
|
+
set(user: User): Promise<void>;
|
|
5
5
|
}
|
|
6
6
|
export declare class GenericUserSession implements UserSession {
|
|
7
7
|
readonly storage: AuthStorage;
|
|
8
8
|
constructor(storage: AuthStorage);
|
|
9
|
-
get(): User | null
|
|
10
|
-
set(user: User | null): void
|
|
9
|
+
get(): Promise<User | null>;
|
|
10
|
+
set(user: User | null): Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=UserSession.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSession.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/UserSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAsB,IAAI,EAAE,MAAM,YAAY,CAAC;AAIxE,MAAM,WAAW,WAAW;IAC1B,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"UserSession.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/UserSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAsB,IAAI,EAAE,MAAM,YAAY,CAAC;AAIxE,MAAM,WAAW,WAAW;IAC1B,GAAG,IAAI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAC5B,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,qBAAa,kBAAmB,YAAW,WAAW;IACxC,QAAQ,CAAC,OAAO,EAAE,WAAW;gBAApB,OAAO,EAAE,WAAW;IAEnC,GAAG,IAAI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAK3B,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAO5C"}
|
|
@@ -8,16 +8,16 @@ class GenericUserSession {
|
|
|
8
8
|
constructor(storage) {
|
|
9
9
|
this.storage = storage;
|
|
10
10
|
}
|
|
11
|
-
get() {
|
|
12
|
-
const user = this.storage.get(types_js_1.UserStorage.USER);
|
|
11
|
+
async get() {
|
|
12
|
+
const user = await this.storage.get(types_js_1.UserStorage.USER);
|
|
13
13
|
return user ? JSON.parse(user) : null;
|
|
14
14
|
}
|
|
15
|
-
set(user) {
|
|
15
|
+
async set(user) {
|
|
16
16
|
const forwardedTokens = user?.forwardedTokens
|
|
17
17
|
? (0, jwt_js_1.convertForwardedTokenFormat)(user?.forwardedTokens)
|
|
18
18
|
: null;
|
|
19
19
|
const value = user ? JSON.stringify({ ...user, forwardedTokens }) : "";
|
|
20
|
-
this.storage.set(types_js_1.UserStorage.USER, value);
|
|
20
|
+
await this.storage.set(types_js_1.UserStorage.USER, value);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.GenericUserSession = GenericUserSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSession.js","sourceRoot":"","sources":["../../../../../src/shared/lib/UserSession.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,yCAA2D;AAO3D,MAAa,kBAAkB;IACR;IAArB,YAAqB,OAAoB;QAApB,YAAO,GAAP,OAAO,CAAa;IAAG,CAAC;IAE7C,GAAG;
|
|
1
|
+
{"version":3,"file":"UserSession.js","sourceRoot":"","sources":["../../../../../src/shared/lib/UserSession.ts"],"names":[],"mappings":";;;AACA,oDAAoD;AACpD,yCAA2D;AAO3D,MAAa,kBAAkB;IACR;IAArB,YAAqB,OAAoB;QAApB,YAAO,GAAP,OAAO,CAAa;IAAG,CAAC;IAE7C,KAAK,CAAC,GAAG;QACP,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAW,CAAC,IAAI,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAiB;QACzB,MAAM,eAAe,GAAG,IAAI,EAAE,eAAe;YAC3C,CAAC,CAAC,IAAA,oCAA2B,EAAC,IAAI,EAAE,eAAqC,CAAC;YAC1E,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;CACF;AAfD,gDAeC","sourcesContent":["import type { AuthStorage, ForwardedTokensJWT, User } from \"@/types.js\";\nimport { UserStorage } from \"@/shared/lib/types.js\";\nimport { convertForwardedTokenFormat } from \"@/lib/jwt.js\";\n\nexport interface UserSession {\n get(): Promise<User | null>;\n set(user: User): Promise<void>;\n}\n\nexport class GenericUserSession implements UserSession {\n constructor(readonly storage: AuthStorage) {}\n\n async get(): Promise<User | null> {\n const user = await this.storage.get(UserStorage.USER);\n return user ? JSON.parse(user) : null;\n }\n\n async set(user: User | null): Promise<void> {\n const forwardedTokens = user?.forwardedTokens\n ? convertForwardedTokenFormat(user?.forwardedTokens as ForwardedTokensJWT)\n : null;\n const value = user ? JSON.stringify({ ...user, forwardedTokens }) : \"\";\n await this.storage.set(UserStorage.USER, value);\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ exports.getUser = getUser;
|
|
|
4
4
|
const util_js_1 = require("../../shared/lib/util.js");
|
|
5
5
|
const jwt_1 = require("oslo/jwt");
|
|
6
6
|
async function getUser(storage) {
|
|
7
|
-
const tokens = (0, util_js_1.retrieveTokens)(storage);
|
|
7
|
+
const tokens = await (0, util_js_1.retrieveTokens)(storage);
|
|
8
8
|
if (!tokens)
|
|
9
9
|
return null;
|
|
10
10
|
// Assumes all information is in the ID token
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../../../src/shared/lib/session.ts"],"names":[],"mappings":";;AAIA,0BAMC;AAVD,kDAAsD;AACtD,kCAAoC;AAG7B,KAAK,UAAU,OAAO,CAAC,OAAoB;IAChD,MAAM,MAAM,GAAG,IAAA,wBAAc,EAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../../../src/shared/lib/session.ts"],"names":[],"mappings":";;AAIA,0BAMC;AAVD,kDAAsD;AACtD,kCAAoC;AAG7B,KAAK,UAAU,OAAO,CAAC,OAAoB;IAChD,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAc,EAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,6CAA6C;IAC7C,OAAQ,IAAA,cAAQ,EAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAgB,IAAI,IAAI,CAAC;AAC9D,CAAC","sourcesContent":["import { retrieveTokens } from \"@/shared/lib/util.js\";\nimport { parseJWT } from \"oslo/jwt\";\nimport type { AuthStorage, User } from \"@/types.js\";\n\nexport async function getUser(storage: AuthStorage): Promise<User | null> {\n const tokens = await retrieveTokens(storage);\n if (!tokens) return null;\n\n // Assumes all information is in the ID token\n return (parseJWT(tokens.id_token)?.payload as User) ?? null;\n}\n"]}
|
|
@@ -18,8 +18,8 @@ export declare const DEFAULT_COOKIE_DURATION: number;
|
|
|
18
18
|
export declare abstract class CookieStorage implements AuthStorage {
|
|
19
19
|
protected settings: CookieStorageSettings;
|
|
20
20
|
protected constructor(settings?: Partial<CookieStorageSettings>);
|
|
21
|
-
abstract get(key: string): string | null
|
|
22
|
-
abstract set(key: string, value: string): void
|
|
21
|
+
abstract get(key: string): Promise<string | null>;
|
|
22
|
+
abstract set(key: string, value: string): Promise<void>;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEhF,KAAK,cAAc,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,GAAG,IAAI,WAAW,CAAC;IACnB,OAAO,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IACtC,GAAG,CAAC,IA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MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAU,CAAC;AAE/C,8BAAsB,aAAc,YAAW,WAAW;IACxD,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IAC1C,SAAS,aAAa,QAAQ,GAAE,OAAO,CAAC,qBAAqB,CAAM;IAanE,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CACxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../../src/shared/lib/storage.ts"],"names":[],"mappings":";;;AAoBa,QAAA,uBAAuB,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AAE7D,MAAsB,aAAa;IACvB,QAAQ,CAAwB;IAC1C,YAAsB,WAA2C,EAAE;QACjE,IAAI,CAAC,QAAQ,GAAG;YACd,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI;YACnC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,IAAI;YAC/B,6CAA6C;YAC7C,kEAAkE;YAClE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,KAAK;YACpC,OAAO,EACL,QAAQ,CAAC,OAAO;gBAChB,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,+BAAuB,CAAC;YACvD,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,GAAG;SAC3B,CAAC;IACJ,CAAC;CAGF;AAjBD,sCAiBC","sourcesContent":["import type { AuthStorage, SessionData, UnknownObject, User } from \"@/types.js\";\n\ntype SameSiteOption = \"strict\" | \"lax\" | \"none\";\n\nexport interface SessionStorage {\n get(): SessionData;\n getUser(): User<UnknownObject> | null;\n set(data: Partial<SessionData>): void;\n setUser(data: User<UnknownObject> | null): void;\n clear(): void;\n}\n\nexport type CookieStorageSettings = {\n httpOnly: boolean;\n secure: boolean;\n sameSite: SameSiteOption;\n expires: Date;\n path: string;\n};\n\nexport const DEFAULT_COOKIE_DURATION = 60 * 15; // 15 minutes\n\nexport abstract class CookieStorage implements AuthStorage {\n protected settings: CookieStorageSettings;\n protected constructor(settings: Partial<CookieStorageSettings> = {}) {\n this.settings = {\n httpOnly: settings.httpOnly ?? true,\n secure: settings.secure ?? true,\n // the callback request comes the auth server\n // 'lax' ensures the code_verifier cookie is sent with the request\n sameSite: settings.sameSite ?? \"lax\",\n expires:\n settings.expires ??\n new Date(Date.now() + 1000 * DEFAULT_COOKIE_DURATION),\n path: settings.path ?? \"/\",\n };\n }\n abstract get(key: string): string | null
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../../src/shared/lib/storage.ts"],"names":[],"mappings":";;;AAoBa,QAAA,uBAAuB,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AAE7D,MAAsB,aAAa;IACvB,QAAQ,CAAwB;IAC1C,YAAsB,WAA2C,EAAE;QACjE,IAAI,CAAC,QAAQ,GAAG;YACd,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI;YACnC,MAAM,EAAE,QAAQ,CAAC,MAAM,IAAI,IAAI;YAC/B,6CAA6C;YAC7C,kEAAkE;YAClE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,KAAK;YACpC,OAAO,EACL,QAAQ,CAAC,OAAO;gBAChB,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,+BAAuB,CAAC;YACvD,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,GAAG;SAC3B,CAAC;IACJ,CAAC;CAGF;AAjBD,sCAiBC","sourcesContent":["import type { AuthStorage, SessionData, UnknownObject, User } from \"@/types.js\";\n\ntype SameSiteOption = \"strict\" | \"lax\" | \"none\";\n\nexport interface SessionStorage {\n get(): SessionData;\n getUser(): User<UnknownObject> | null;\n set(data: Partial<SessionData>): void;\n setUser(data: User<UnknownObject> | null): void;\n clear(): void;\n}\n\nexport type CookieStorageSettings = {\n httpOnly: boolean;\n secure: boolean;\n sameSite: SameSiteOption;\n expires: Date;\n path: string;\n};\n\nexport const DEFAULT_COOKIE_DURATION = 60 * 15; // 15 minutes\n\nexport abstract class CookieStorage implements AuthStorage {\n protected settings: CookieStorageSettings;\n protected constructor(settings: Partial<CookieStorageSettings> = {}) {\n this.settings = {\n httpOnly: settings.httpOnly ?? true,\n secure: settings.secure ?? true,\n // the callback request comes the auth server\n // 'lax' ensures the code_verifier cookie is sent with the request\n sameSite: settings.sameSite ?? \"lax\",\n expires:\n settings.expires ??\n new Date(Date.now() + 1000 * DEFAULT_COOKIE_DURATION),\n path: settings.path ?? \"/\",\n };\n }\n abstract get(key: string): Promise<string | null>;\n abstract set(key: string, value: string): Promise<void>;\n}\n"]}
|
|
@@ -25,9 +25,9 @@ export declare function generateOauthLogoutUrl(config: {
|
|
|
25
25
|
}): Promise<URL>;
|
|
26
26
|
export declare function buildOauth2Client(clientId: string, redirectUri: string, endpoints: Endpoints): OAuth2Client;
|
|
27
27
|
export declare function exchangeTokens(code: string, state: string, pkceProducer: PKCEProducer, oauth2Client: OAuth2Client, oauthServer: string, endpoints: Endpoints): Promise<OIDCTokenResponseBody>;
|
|
28
|
-
export declare function storeTokens(storage: AuthStorage, tokens: OIDCTokenResponseBody): void
|
|
29
|
-
export declare function clearTokens(storage: AuthStorage): void
|
|
30
|
-
export declare function clearUser(storage: AuthStorage): void
|
|
31
|
-
export declare function retrieveTokens(storage: AuthStorage): OIDCTokenResponseBody | null
|
|
28
|
+
export declare function storeTokens(storage: AuthStorage, tokens: OIDCTokenResponseBody): Promise<void>;
|
|
29
|
+
export declare function clearTokens(storage: AuthStorage): Promise<void>;
|
|
30
|
+
export declare function clearUser(storage: AuthStorage): Promise<void>;
|
|
31
|
+
export declare function retrieveTokens(storage: AuthStorage): Promise<OIDCTokenResponseBody | null>;
|
|
32
32
|
export declare function validateOauth2Tokens(tokens: OIDCTokenResponseBody, endpoints: Endpoints, oauth2Client: OAuth2Client, issuer: string): Promise<ParsedTokens>;
|
|
33
33
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/util.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EAET,qBAAqB,EACrB,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGtE;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,EACpB,MAAM,GAAE,OAAO,GAAG,MAAe,GAChC,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,iBAAiB,GAAE,OAAO,CAAC,SAAS,CAAM,GACzC,OAAO,CAAC,SAAS,CAAC,CAMpB;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAEvC,YAAY,EAAE,YAAY,CAAC;CAC5B,GAAG,OAAO,CAAC,GAAG,CAAC,
|
|
1
|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AAW,EAAE,MAAM,EACnB,SAAS,EAAE,SAAS,GACnB,YAAY,CAId;AAED,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,SAAS,kCAqBrB;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,qBAAqB,iBAQ9B;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,iBAKrD;AACD,wBAAsB,SAAS,CAAC,OAAO,EAAE,WAAW,iBAGnD;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAYvC;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,YAAY,CAAC,CA2BvB"}
|
|
@@ -81,7 +81,6 @@ async function generateOauthLoginUrl(config) {
|
|
|
81
81
|
}
|
|
82
82
|
// Required by the auth server for offline_access scope
|
|
83
83
|
oAuthUrl.searchParams.append("prompt", "consent");
|
|
84
|
-
console.log("Generated OAuth URL", oAuthUrl.toString());
|
|
85
84
|
return oAuthUrl;
|
|
86
85
|
}
|
|
87
86
|
async function generateOauthLogoutUrl(config) {
|
|
@@ -111,29 +110,28 @@ async function exchangeTokens(code, state, pkceProducer, oauth2Client, oauthServ
|
|
|
111
110
|
}
|
|
112
111
|
return tokens;
|
|
113
112
|
}
|
|
114
|
-
function storeTokens(storage, tokens) {
|
|
113
|
+
async function storeTokens(storage, tokens) {
|
|
115
114
|
// store tokens in storage ( TODO we should probably store them against the state to allow multiple logins )
|
|
116
|
-
storage.set(types_js_1.OAuthTokens.ID_TOKEN, tokens.id_token);
|
|
117
|
-
storage.set(types_js_1.OAuthTokens.ACCESS_TOKEN, tokens.access_token);
|
|
118
|
-
if (tokens.refresh_token)
|
|
119
|
-
storage.set(types_js_1.OAuthTokens.REFRESH_TOKEN, tokens.refresh_token);
|
|
115
|
+
await storage.set(types_js_1.OAuthTokens.ID_TOKEN, tokens.id_token);
|
|
116
|
+
await storage.set(types_js_1.OAuthTokens.ACCESS_TOKEN, tokens.access_token);
|
|
117
|
+
if (tokens.refresh_token) {
|
|
118
|
+
await storage.set(types_js_1.OAuthTokens.REFRESH_TOKEN, tokens.refresh_token);
|
|
119
|
+
}
|
|
120
120
|
}
|
|
121
|
-
function clearTokens(storage) {
|
|
122
|
-
Object.values(types_js_1.OAuthTokens).
|
|
123
|
-
storage.set(cookie, "");
|
|
124
|
-
});
|
|
125
|
-
Object.values(types_js_1.CodeVerifier.COOKIE_NAME).forEach((cookie) => {
|
|
121
|
+
async function clearTokens(storage) {
|
|
122
|
+
const clearOAuthPromises = Object.values(types_js_1.OAuthTokens).map((cookie) => {
|
|
126
123
|
storage.set(cookie, "");
|
|
127
124
|
});
|
|
125
|
+
await Promise.all([...clearOAuthPromises]);
|
|
128
126
|
}
|
|
129
|
-
function clearUser(storage) {
|
|
127
|
+
async function clearUser(storage) {
|
|
130
128
|
const userSession = new UserSession_js_1.GenericUserSession(storage);
|
|
131
|
-
userSession.set(null);
|
|
129
|
+
await userSession.set(null);
|
|
132
130
|
}
|
|
133
|
-
function retrieveTokens(storage) {
|
|
134
|
-
const idToken = storage.get(types_js_1.OAuthTokens.ID_TOKEN);
|
|
135
|
-
const accessToken = storage.get(types_js_1.OAuthTokens.ACCESS_TOKEN);
|
|
136
|
-
const refreshToken = storage.get(types_js_1.OAuthTokens.REFRESH_TOKEN);
|
|
131
|
+
async function retrieveTokens(storage) {
|
|
132
|
+
const idToken = await storage.get(types_js_1.OAuthTokens.ID_TOKEN);
|
|
133
|
+
const accessToken = await storage.get(types_js_1.OAuthTokens.ACCESS_TOKEN);
|
|
134
|
+
const refreshToken = await storage.get(types_js_1.OAuthTokens.REFRESH_TOKEN);
|
|
137
135
|
if (!idToken || !accessToken)
|
|
138
136
|
return null;
|
|
139
137
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/shared/lib/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,kDAgBC;AAED,8DASC;AAED,sDAsCC;AAED,wDAWC;AAED,8CAQC;AAED,wCA2BC;AAED,kCASC;AAED,kCAOC;AACD,8BAGC;AAED,wCAcC;AAED,oDAgCC;AA5MD,yCAAuD;AACvD,wCAA2C;AAC3C,6CAAwE;AACxE,2CAA6B;AAC7B,yCAA8C;AAE9C,gEAAiE;AAEjE;;GAEG;AACI,KAAK,UAAU,mBAAmB,CACvC,YAAoB,EACpB,SAA2B,MAAM;IAEjC,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QAC3D,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;SACxD,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACxB,CAAC;AAEM,KAAK,UAAU,yBAAyB,CAC7C,WAAmB,EACnB,oBAAwC,EAAE;IAE1C,MAAM,SAAS,GAAG,MAAM,IAAA,4BAAiB,EAAC,WA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,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9D,wBAAwB;IACxB,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,SAAS,CAC1C,MAAM,CAAC,QAAQ,EACf,IAAI,EACJ;QACE,MAAM,EAAE,IAAA,8BAAmB,EAAC,MAAM,CAAC;QACnC,QAAQ,EAAE,YAAY,CAAC,QAAQ;KAChC,CACF,CAAC;IAEF,4BAA4B;IAC5B,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,SAAS,CAC9C,MAAM,CAAC,YAAY,EACnB,IAAI,EACJ;QACE,MAAM,EAAE,IAAA,8BAAmB,EAAC,MAAM,CAAC;KACpC,CACF,CAAC;IAEF,OAAO,IAAA,2BAAgB,EAAC;QACtB,QAAQ,EAAE,eAAe,CAAC,OAAO;QACjC,YAAY,EAAE,mBAAmB,CAAC,OAAO;QACzC,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Utility functions shared by auth server and client integrations\n// Typically these functions should be used inside AuthenticationInitiator and AuthenticationResolver implementations\nimport type {\n AuthStorage,\n Endpoints,\n JWTPayload,\n OIDCTokenResponseBody,\n ParsedTokens,\n} from \"@/types.js\";\nimport { CodeVerifier, OAuthTokens } from \"./types.js\";\nimport { OAuth2Client } from \"oslo/oauth2\";\nimport { getIssuerVariations, getOauthEndpoints } from \"@/lib/oauth.js\";\nimport * as jose from \"jose\";\nimport { withoutUndefined } from \"@/utils.js\";\nimport type { PKCEConsumer, PKCEProducer } from \"@/services/types.js\";\nimport { GenericUserSession } from \"@/shared/lib/UserSession.js\";\n\n/**\n * Given a PKCE code verifier, derive the code challenge using SHA\n */\nexport async function deriveCodeChallenge(\n codeVerifier: string,\n method: \"Plain\" | \"S256\" = \"S256\",\n): Promise<string> {\n if (method === \"Plain\") {\n console.warn(\"Using insecure plain code challenge method\");\n return codeVerifier;\n }\n\n const encoder = new TextEncoder();\n const data = encoder.encode(codeVerifier);\n const digest = await crypto.subtle.digest(\"SHA-256\", data);\n return btoa(String.fromCharCode(...new Uint8Array(digest)))\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\n .replace(/=+$/, \"\");\n}\n\nexport async function getEndpointsWithOverrides(\n oauthServer: string,\n endpointOverrides: Partial<Endpoints> = {},\n): Promise<Endpoints> {\n const endpoints = await getOauthEndpoints(oauthServer);\n return {\n ...endpoints,\n ...endpointOverrides,\n };\n}\n\nexport async function generateOauthLoginUrl(config: {\n clientId: string;\n scopes: string[];\n state: string;\n redirectUrl: string;\n oauthServer: string;\n nonce?: string;\n endpointOverrides?: Partial<Endpoints>;\n // used to get the PKCE challenge\n pkceConsumer: PKCEConsumer;\n}): Promise<URL> {\n const endpoints = await getEndpointsWithOverrides(\n config.oauthServer,\n config.endpointOverrides,\n );\n const oauth2Client = buildOauth2Client(\n config.clientId,\n config.redirectUrl,\n endpoints,\n );\n const challenge = await config.pkceConsumer.getCodeChallenge();\n const oAuthUrl = await oauth2Client.createAuthorizationURL({\n state: config.state,\n scopes: config.scopes,\n });\n // The OAuth2 client supports PKCE, but does not allow passing in a code challenge from some other source\n // It only allows passing in a code verifier which it then hashes itself.\n oAuthUrl.searchParams.append(\"code_challenge\", challenge);\n oAuthUrl.searchParams.append(\"code_challenge_method\", \"S256\");\n if (config.nonce) {\n // nonce isn't supported by oslo, so we add it manually\n oAuthUrl.searchParams.append(\"nonce\", config.nonce);\n }\n // Required by the auth server for offline_access scope\n oAuthUrl.searchParams.append(\"prompt\", \"consent\");\n\n console.log(\"Generated OAuth URL\", oAuthUrl.toString());\n return oAuthUrl;\n}\n\nexport async function generateOauthLogoutUrl(config: {\n clientId: string;\n scopes: string[];\n oauthServer: string;\n endpointOverrides?: Partial<Endpoints>;\n // used to get the PKCE challenge\n pkceConsumer: PKCEConsumer;\n}): Promise<URL> {\n // TODO TECH-676: Implement logout\n console.log(\"generateOauthLogoutUrl not implemented\", config);\n return new URL(\"http://localhost\");\n}\n\nexport function buildOauth2Client(\n clientId: string,\n redirectUri: string,\n endpoints: Endpoints,\n): OAuth2Client {\n return new OAuth2Client(clientId, endpoints.auth, endpoints.token, {\n redirectURI: redirectUri,\n });\n}\n\nexport async function exchangeTokens(\n code: string,\n state: string,\n pkceProducer: PKCEProducer,\n oauth2Client: OAuth2Client,\n oauthServer: string,\n endpoints: Endpoints,\n) {\n const codeVerifier = await pkceProducer.getCodeVerifier();\n if (!codeVerifier) throw new Error(\"Code verifier not found in state\");\n\n const tokens =\n await oauth2Client.validateAuthorizationCode<OIDCTokenResponseBody>(code, {\n codeVerifier,\n });\n\n // Validate relevant tokens\n try {\n await validateOauth2Tokens(tokens, endpoints, oauth2Client, oauthServer);\n } catch (error) {\n console.error(\"tokenExchange error\", { error, tokens });\n throw new Error(\n `OIDC tokens validation failed: ${(error as Error).message}`,\n );\n }\n\n return tokens;\n}\n\nexport function storeTokens(\n storage: AuthStorage,\n tokens: OIDCTokenResponseBody,\n) {\n // store tokens in storage ( TODO we should probably store them against the state to allow multiple logins )\n storage.set(OAuthTokens.ID_TOKEN, tokens.id_token);\n storage.set(OAuthTokens.ACCESS_TOKEN, tokens.access_token);\n if (tokens.refresh_token)\n storage.set(OAuthTokens.REFRESH_TOKEN, tokens.refresh_token);\n}\n\nexport function clearTokens(storage: AuthStorage) {\n Object.values(OAuthTokens).forEach((cookie) => {\n storage.set(cookie, \"\");\n });\n Object.values(CodeVerifier.COOKIE_NAME).forEach((cookie) => {\n storage.set(cookie, \"\");\n });\n}\nexport function clearUser(storage: AuthStorage) {\n const userSession = new GenericUserSession(storage);\n userSession.set(null);\n}\n\nexport function retrieveTokens(\n storage: AuthStorage,\n): OIDCTokenResponseBody | null {\n const idToken = storage.get(OAuthTokens.ID_TOKEN);\n const accessToken = storage.get(OAuthTokens.ACCESS_TOKEN);\n const refreshToken = storage.get(OAuthTokens.REFRESH_TOKEN);\n\n if (!idToken || !accessToken) return null;\n\n return {\n id_token: idToken,\n access_token: accessToken,\n refresh_token: refreshToken ?? undefined,\n };\n}\n\nexport async function validateOauth2Tokens(\n tokens: OIDCTokenResponseBody,\n endpoints: Endpoints,\n oauth2Client: OAuth2Client,\n issuer: string,\n): Promise<ParsedTokens> {\n const JWKS = jose.createRemoteJWKSet(new URL(endpoints.jwks));\n\n // validate the ID token\n const idTokenResponse = await jose.jwtVerify<JWTPayload>(\n tokens.id_token,\n JWKS,\n {\n issuer: getIssuerVariations(issuer),\n audience: oauth2Client.clientId,\n },\n );\n\n // validate the access token\n const accessTokenResponse = await jose.jwtVerify<JWTPayload>(\n tokens.access_token,\n JWKS,\n {\n issuer: getIssuerVariations(issuer),\n },\n );\n\n return withoutUndefined({\n id_token: idTokenResponse.payload,\n access_token: accessTokenResponse.payload,\n refresh_token: tokens.refresh_token,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/shared/lib/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,kDAgBC;AAED,8DASC;AAED,sDAqCC;AAED,wDAWC;AAED,8CAQC;AAED,wCA2BC;AAED,kCAUC;AAED,kCAKC;AACD,8BAGC;AAED,wCAcC;AAED,oDAgCC;AA1MD,yCAAyC;AACzC,wCAA2C;AAC3C,6CAAwE;AACxE,2CAA6B;AAC7B,yCAA8C;AAE9C,gEAAiE;AAEjE;;GAEG;AACI,KAAK,UAAU,mBAAmB,CACvC,YAAoB,EACpB,SAA2B,MAAM;IAEjC,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QAC3D,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAA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AI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAE1C,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,WAAW;QACzB,aAAa,EAAE,YAAY,IAAI,SAAS;KACzC,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,oBAAoB,CACxC,MAA6B,EAC7B,SAAoB,EACpB,YAA0B,EAC1B,MAAc;IAEd,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAE9D,wBAAwB;IACxB,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,SAAS,CAC1C,MAAM,CAAC,QAAQ,EACf,IAAI,EACJ;QACE,MAAM,EAAE,IAAA,8BAAmB,EAAC,MAAM,CAAC;QACnC,QAAQ,EAAE,YAAY,CAAC,QAAQ;KAChC,CACF,CAAC;IAEF,4BAA4B;IAC5B,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,SAAS,CAC9C,MAAM,CAAC,YAAY,EACnB,IAAI,EACJ;QACE,MAAM,EAAE,IAAA,8BAAmB,EAAC,MAAM,CAAC;KACpC,CACF,CAAC;IAEF,OAAO,IAAA,2BAAgB,EAAC;QACtB,QAAQ,EAAE,eAAe,CAAC,OAAO;QACjC,YAAY,EAAE,mBAAmB,CAAC,OAAO;QACzC,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Utility functions shared by auth server and client integrations\n// Typically these functions should be used inside AuthenticationInitiator and AuthenticationResolver implementations\nimport type {\n AuthStorage,\n Endpoints,\n JWTPayload,\n OIDCTokenResponseBody,\n ParsedTokens,\n} from \"@/types.js\";\nimport { OAuthTokens } from \"./types.js\";\nimport { OAuth2Client } from \"oslo/oauth2\";\nimport { getIssuerVariations, getOauthEndpoints } from \"@/lib/oauth.js\";\nimport * as jose from \"jose\";\nimport { withoutUndefined } from \"@/utils.js\";\nimport type { PKCEConsumer, PKCEProducer } from \"@/services/types.js\";\nimport { GenericUserSession } from \"@/shared/lib/UserSession.js\";\n\n/**\n * Given a PKCE code verifier, derive the code challenge using SHA\n */\nexport async function deriveCodeChallenge(\n codeVerifier: string,\n method: \"Plain\" | \"S256\" = \"S256\",\n): Promise<string> {\n if (method === \"Plain\") {\n console.warn(\"Using insecure plain code challenge method\");\n return codeVerifier;\n }\n\n const encoder = new TextEncoder();\n const data = encoder.encode(codeVerifier);\n const digest = await crypto.subtle.digest(\"SHA-256\", data);\n return btoa(String.fromCharCode(...new Uint8Array(digest)))\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\n .replace(/=+$/, \"\");\n}\n\nexport async function getEndpointsWithOverrides(\n oauthServer: string,\n endpointOverrides: Partial<Endpoints> = {},\n): Promise<Endpoints> {\n const endpoints = await getOauthEndpoints(oauthServer);\n return {\n ...endpoints,\n ...endpointOverrides,\n };\n}\n\nexport async function generateOauthLoginUrl(config: {\n clientId: string;\n scopes: string[];\n state: string;\n redirectUrl: string;\n oauthServer: string;\n nonce?: string;\n endpointOverrides?: Partial<Endpoints>;\n // used to get the PKCE challenge\n pkceConsumer: PKCEConsumer;\n}): Promise<URL> {\n const endpoints = await getEndpointsWithOverrides(\n config.oauthServer,\n config.endpointOverrides,\n );\n const oauth2Client = buildOauth2Client(\n config.clientId,\n config.redirectUrl,\n endpoints,\n );\n const challenge = await config.pkceConsumer.getCodeChallenge();\n const oAuthUrl = await oauth2Client.createAuthorizationURL({\n state: config.state,\n scopes: config.scopes,\n });\n // The OAuth2 client supports PKCE, but does not allow passing in a code challenge from some other source\n // It only allows passing in a code verifier which it then hashes itself.\n oAuthUrl.searchParams.append(\"code_challenge\", challenge);\n oAuthUrl.searchParams.append(\"code_challenge_method\", \"S256\");\n if (config.nonce) {\n // nonce isn't supported by oslo, so we add it manually\n oAuthUrl.searchParams.append(\"nonce\", config.nonce);\n }\n // Required by the auth server for offline_access scope\n oAuthUrl.searchParams.append(\"prompt\", \"consent\");\n\n return oAuthUrl;\n}\n\nexport async function generateOauthLogoutUrl(config: {\n clientId: string;\n scopes: string[];\n oauthServer: string;\n endpointOverrides?: Partial<Endpoints>;\n // used to get the PKCE challenge\n pkceConsumer: PKCEConsumer;\n}): Promise<URL> {\n // TODO TECH-676: Implement logout\n console.log(\"generateOauthLogoutUrl not implemented\", config);\n return new URL(\"http://localhost\");\n}\n\nexport function buildOauth2Client(\n clientId: string,\n redirectUri: string,\n endpoints: Endpoints,\n): OAuth2Client {\n return new OAuth2Client(clientId, endpoints.auth, endpoints.token, {\n redirectURI: redirectUri,\n });\n}\n\nexport async function exchangeTokens(\n code: string,\n state: string,\n pkceProducer: PKCEProducer,\n oauth2Client: OAuth2Client,\n oauthServer: string,\n endpoints: Endpoints,\n) {\n const codeVerifier = await pkceProducer.getCodeVerifier();\n if (!codeVerifier) throw new Error(\"Code verifier not found in state\");\n\n const tokens =\n await oauth2Client.validateAuthorizationCode<OIDCTokenResponseBody>(code, {\n codeVerifier,\n });\n\n // Validate relevant tokens\n try {\n await validateOauth2Tokens(tokens, endpoints, oauth2Client, oauthServer);\n } catch (error) {\n console.error(\"tokenExchange error\", { error, tokens });\n throw new Error(\n `OIDC tokens validation failed: ${(error as Error).message}`,\n );\n }\n\n return tokens;\n}\n\nexport async function storeTokens(\n storage: AuthStorage,\n tokens: OIDCTokenResponseBody,\n) {\n // store tokens in storage ( TODO we should probably store them against the state to allow multiple logins )\n await storage.set(OAuthTokens.ID_TOKEN, tokens.id_token);\n await storage.set(OAuthTokens.ACCESS_TOKEN, tokens.access_token);\n if (tokens.refresh_token) {\n await storage.set(OAuthTokens.REFRESH_TOKEN, tokens.refresh_token);\n }\n}\n\nexport async function clearTokens(storage: AuthStorage) {\n const clearOAuthPromises = Object.values(OAuthTokens).map((cookie) => {\n storage.set(cookie, \"\");\n });\n await Promise.all([...clearOAuthPromises]);\n}\nexport async function clearUser(storage: AuthStorage) {\n const userSession = new GenericUserSession(storage);\n await userSession.set(null);\n}\n\nexport async function retrieveTokens(\n storage: AuthStorage,\n): Promise<OIDCTokenResponseBody | null> {\n const idToken = await storage.get(OAuthTokens.ID_TOKEN);\n const accessToken = await storage.get(OAuthTokens.ACCESS_TOKEN);\n const refreshToken = await storage.get(OAuthTokens.REFRESH_TOKEN);\n\n if (!idToken || !accessToken) return null;\n\n return {\n id_token: idToken,\n access_token: accessToken,\n refresh_token: refreshToken ?? undefined,\n };\n}\n\nexport async function validateOauth2Tokens(\n tokens: OIDCTokenResponseBody,\n endpoints: Endpoints,\n oauth2Client: OAuth2Client,\n issuer: string,\n): Promise<ParsedTokens> {\n const JWKS = jose.createRemoteJWKSet(new URL(endpoints.jwks));\n\n // validate the ID token\n const idTokenResponse = await jose.jwtVerify<JWTPayload>(\n tokens.id_token,\n JWKS,\n {\n issuer: getIssuerVariations(issuer),\n audience: oauth2Client.clientId,\n },\n );\n\n // validate the access token\n const accessTokenResponse = await jose.jwtVerify<JWTPayload>(\n tokens.access_token,\n JWKS,\n {\n issuer: getIssuerVariations(issuer),\n },\n );\n\n return withoutUndefined({\n id_token: idTokenResponse.payload,\n access_token: accessTokenResponse.payload,\n refresh_token: tokens.refresh_token,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthProvider.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/AuthProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EACZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,MAAM,EAAe,WAAW,EAAE,MAAM,YAAY,CAAC;AAanE,OAAO,KAAK,EAA0B,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAqBhF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE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