@asgardeo/auth-spa 0.2.12 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +34 -35
  2. package/dist/asgardeo-spa.production.esm.js +16 -16
  3. package/dist/asgardeo-spa.production.esm.js.map +1 -1
  4. package/dist/asgardeo-spa.production.js +13 -13
  5. package/dist/asgardeo-spa.production.js.map +1 -1
  6. package/dist/asgardeo-spa.production.min.js +1 -1
  7. package/dist/asgardeo-spa.production.min.js.map +1 -1
  8. package/dist/polyfilled/asgardeo-spa.production.esm.js +41 -41
  9. package/dist/polyfilled/asgardeo-spa.production.esm.js.map +1 -1
  10. package/dist/polyfilled/asgardeo-spa.production.js +41 -41
  11. package/dist/polyfilled/asgardeo-spa.production.js.map +1 -1
  12. package/dist/polyfilled/asgardeo-spa.production.min.js +1 -1
  13. package/dist/polyfilled/asgardeo-spa.production.min.js.map +1 -1
  14. package/dist/src/client.d.ts +6 -6
  15. package/dist/src/client.d.ts.map +1 -1
  16. package/dist/src/client.js +7 -6
  17. package/dist/src/client.js.map +1 -1
  18. package/dist/src/clients/main-thread-client.d.ts.map +1 -1
  19. package/dist/src/clients/main-thread-client.js +125 -46
  20. package/dist/src/clients/main-thread-client.js.map +1 -1
  21. package/dist/src/clients/web-worker-client.d.ts.map +1 -1
  22. package/dist/src/clients/web-worker-client.js +42 -19
  23. package/dist/src/clients/web-worker-client.js.map +1 -1
  24. package/dist/src/constants/parameters.d.ts +1 -0
  25. package/dist/src/constants/parameters.d.ts.map +1 -1
  26. package/dist/src/constants/parameters.js +1 -0
  27. package/dist/src/constants/parameters.js.map +1 -1
  28. package/dist/src/models/client.d.ts +2 -2
  29. package/dist/src/models/client.d.ts.map +1 -1
  30. package/dist/src/models/http-client.d.ts +1 -1
  31. package/dist/src/models/http-client.d.ts.map +1 -1
  32. package/dist/src/models/web-worker.d.ts +1 -2
  33. package/dist/src/models/web-worker.d.ts.map +1 -1
  34. package/dist/src/worker/client.worker.d.ts.map +1 -1
  35. package/dist/src/worker/client.worker.js +1 -7
  36. package/dist/src/worker/client.worker.js.map +1 -1
  37. package/dist/src/worker/worker-core.d.ts.map +1 -1
  38. package/dist/src/worker/worker-core.js +20 -7
  39. package/dist/src/worker/worker-core.js.map +1 -1
  40. package/dist/tsconfig.tsbuildinfo +1 -1
  41. package/package.json +6 -6
  42. package/src/client.ts +8 -7
  43. package/src/clients/main-thread-client.ts +149 -67
  44. package/src/clients/web-worker-client.ts +50 -24
  45. package/src/constants/parameters.ts +1 -0
  46. package/src/models/client.ts +2 -2
  47. package/src/models/http-client.ts +1 -1
  48. package/src/models/web-worker.ts +1 -2
  49. package/src/worker/client.worker.ts +3 -12
  50. package/src/worker/worker-core.ts +20 -8
@@ -1 +1 @@
1
- {"program":{"fileNames":["../node_modules/typescript/lib/lib.es6.d.ts","../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/axios/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/client-config.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/oidc-endpoints.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/custom-grant-template-tags.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/data.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/parameters.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/scopes.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/environments.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/client-config.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/data.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/oidc-provider-meta-data.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/token.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/custom-grant.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/id-token.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/authorization-url.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/user.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/crypto.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/data/data-layer.d.ts","../node_modules/@asgardeo/auth-js/dist/src/data/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/authentication-client.d.ts","../node_modules/@asgardeo/auth-js/dist/src/public-api.d.ts","../node_modules/@asgardeo/auth-js/dist/src/index.d.ts","../src/constants/messages-types.ts","../src/constants/storage.ts","../src/constants/hooks.ts","../src/constants/session-management.ts","../src/constants/parameters.ts","../src/constants/index.ts","../src/exception/exception.ts","../src/exception/index.ts","../src/index.ts","../src/helpers/spa-helper.ts","../src/http-client/helpers/decorators.ts","../src/http-client/helpers/index.ts","../src/http-client/models/axios-http-client.ts","../src/http-client/models/http-client.ts","../src/http-client/models/index.ts","../src/http-client/clients/axios-http-client.ts","../src/http-client/clients/index.ts","../src/http-client/index.ts","../src/models/client.ts","../src/models/message.ts","../src/models/http-client.ts","../src/models/web-worker.ts","../src/models/session-management-helper.ts","../src/models/client-config.ts","../src/models/sign-in.ts","../src/models/index.ts","../src/utils/message-utils.ts","../src/utils/spa-utils.ts","../src/utils/index.ts","../src/helpers/session-management-helper.ts","../src/helpers/index.ts","../src/stores/local-store.ts","../src/stores/memory-store.ts","../src/stores/session-store.ts","../src/stores/index.ts","../src/clients/main-thread-client.ts","../src/clients/web-worker-client.ts","../src/clients/index.ts","../src/client.ts","../src/public-api.ts","../src/index-polyfill.ts","../polyfilled/esm.d.ts","../polyfilled/umd.d.ts","../src/web-worker.d.ts","../src/worker/worker-core.ts","../src/worker/client.worker.ts","../src/worker/index.ts","../node_modules/@types/crypto-js/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/resolve/index.d.ts","../../node_modules/@types/eslint-visitor-keys/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts"],"fileInfos":["721cec59c3fef87aaf480047d821fb758b3ec9482c4129a54631e6e25e432a31",{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"e34eb9339171ec45da2801c1967e4d378bd61a1dceaa1b1b4e1b6d28cb9ca962","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"3154a026075044aa102298fe9e6a7a14aaa26a06270680c7478a1765af8ffb09","6009474c65328718bc827d496d956b2fc7e31a3f643e0f260893b7d976619b80","8f1840a1bcc07dff7b2699ee094572773916dba87fc8d117991c4877f3015789","2ec162d98a48073f00821108eec20151906d383665ce91278aed4a1e8c30a199","6d95d47e30b37d6343fbd45412107bf9f15a953b286bd38da70eb2f6be60cfb2","eb0e3a88b1c4129f1b8806e2088ecd5b5bb1d1a642cfaf097599e0962d7ef14f","1408465b7ef31763e5827b443a38d83d125e5d9ccb60ed23c49cbd5e16bb35e4","1d5f29a8df2a26f1f2a27aafc55e89708cb5648a57464d2424eafa795694e188","b769da9db76c0a97e79e482fdb8c16cbfe9858e52b64d29251b9ae5e4c57328c","e00379f171286b46a85b97f8fc212da7317a64776557e91b0f60e3f00aecde13","5d7881988209b37a5e6787510c2827423082a5eff6ebe06c92db73f56b5f877b","9ff732b56ae6ed86f5285789b7db6590eeec4d1723d0aab0030cd0b198501185","a24a235aa6c4de52ec1f80ceddb83e12c068c8dbba57ea953ea9b7718bae96c9","825694ed40ad4a303a52a237b6b802db0bfa3863b7d8d567cb8a1d6320146f9e","f5208dad431ac789aa877218bd9cb927956dd70080be8a6d0ef1bb3338aa8297","6635b93bcfaa940eb5b2ce90bb90bebd6164ed48cf8f18195bdbdbbc6c45f5aa","c0c32cd791d40c234e202fa9d8788b555a4dd3c8b9eb15ac1d5d13dd0b551bb7","6118155581313325dbba17d5749d6afacea297d73330b3b3c00544277b8945d5","be1eb3d1d2134b38e8378537f6a1f3d8ce903099d5ca7a85a3fd8d22ecc2f297","9d34db4a49519acd58bc7ab38efe284d5c8832e20d9771dfa6d4c7a811fa097c","e8c3776e0a629f3ae805d16655d4d3f01d29638b64126361c35b2c95d4c1ca37","0a33fe4f991e14cc2395c4a25192e6b1102ea330691a70ede2bc484a8275674a","4fa26edbe2cd2f0cd5becb3c28f2257fc43fbe3f0cbc1285af2f1f90d5caaab0","16477c5d5d66d2628a79168722da47a27b1f20331418852acccbdbe82294b70c","4246c3200511ea7c1c230549a22d9c0e17b15a8ff0abdde58330ee5b69c0fa4d","c9b106e487f5552eb3854e49bf5956bd90c4c36fb0aeff0cc0b62b5b660eb1cf","bdddc9f1599d1b01c07b5a6e9da4629a58712972797ffc96be3fe5cd178dfa72","9ced747e5c237fb9a51b44ee8811ed66ba3665b362b5bec6e0af6d3b7df01c79","4b2d9035b3e6411d1b99b86991fa7f8d78453abbd5e256b4f6a74cd0e313debf","be327204faa5e238e666af2688a6ecfc48bac20ce379a32bee15d98b3d8d6ac3","7e6c0fb9e150f07ca6a9caa7b39aaa840d861a3cf307d8a9b72b5bb55c0ec027","fd1b6953785d5fbde4feda18020a8debdafdd0bd14c332a4178cd245a878e43f","1a5fd7fd06c35fceef3d43a0637fe370bfe1daa82f538b183cb065bb0aec3a78","98c679ad74f5dc65535f79a19f19fa3d1142bbe682792c0584ce1f11824c40b7","7c3ab924fd8494f286ad3966ebbcbcf7fe07d81bc3d928e1800b05d75a7fadac","c241721993235e5b85856909593605f12530c5e366f0456f5cd2158c19dcbad6","6da64e55101ad42112c2f2327c89f16abc5879c56042585882b32610c764778d","ed8d18f4db98a6038b2d818776a23e9d70c1c59b83368af2e5c525d7fea540fe","a21280e001d7c8996040872e63b114ca4d2a94476e0c741ee198248d0d2ddbd6","ce541ae360182b6dfddfe055e4b6c6766bf265209005b0f2ad2f1bc67343a785","d373d738f77efc587af5b7cc4f0072af050dd4a7af7fd404928423052101139f","886f9c6cce85546bd9e7acdb8c3e3642418efe459dcf1f468c4c8ffa279427bd","d155c20be2e5f852a976525a804e2a58a5a83caad9638e7457010810990ab0aa","a120de60b5628d616c2b645e56d7f8739c82c0f50a716652c8be11330cc3b88c","5f42eb5c6794dd4b5f38907e1300aaaf7a2cf26a1800bb273f6c75a785db22bd","3ba1efa5b0b29dfb759a89ce1d9effbadeecbe625f210c2cf9118ed20746a8dd","0ca460a52b36e01360909e55f93f88155d956c4d2ccdcefec989290bddddc721","19220cd1cbf685225e3f30f6d909920ed47e2ec5a188a3dd33e3231efc990f5b","e6ef854ad1e937ef95b0ddc9ad7a6c7cf60ca7d37dcd4d2db46e6a22b9921bb3","d93adf1ea2eef8c54cb41fdfb8541c6443725662a1adb5dad80c0dac4d8d61bf","2a3ee5ceba0a31af3ccb8065831a9681fa378f318fdcfbd01d005c6cdcaa6b36","7fbd9b63489c382f4d66c3e446a225313c7c96413aaed65de0b835bb63d79fae","093ceafe704d2244ba3e297d7ce665d7f2e4a7112cf1334a9373b76acb9402a8","d5047c12cbdc4055b1f9c82ad41bbcaae390ea6bdc04b71c996c2bcb35008781","6fdb3f5a7f50a9a330fe71b975d92dad426632931bce0852988dbd727797a8b7","b3643471b0860e55440721bc05499b5c6373d5ad8aad96d429a78484024176a9","789a86243d9f9d1d2816f005c924c07e4054193bcd9a5dccb9b683722251586b","4ac58569ec95e39656dff0a8b5cd43d847bb537d6ebf85c5cfe5fadbfe65cae5","a403cebc4c34b09157a0abdbed93e79e5f4055d36072f858a6db85cb8dea5f12","25d413bea0bbeb57125ef2ae81f1babcb09480c7ca056d2722c17762219f0d3d","b77e824a10c28c8ffd46cc37be6d2ef718b81262a831466e511c8d943d7d4d73","671315ee8d597ab350f046802451dc7176d8a1aa08580c6d6275aae87bb9f9bb","4b4bd153a58fab112c13868b35006215f02cd814ad8835cc5594d0b487128d1e","d6ce89e3e6f99b71c87dd15606b62e5196ca3f23d78902743770c1ef960cdb06","0d4401a656f3d5480631a345ade69ef23a880ebd4c599f9230d0a3a8cca08253","99fc1afc2ee80d9ccca4185b67de2123563287ba59f7f717368cc70722383b3e","99fc1afc2ee80d9ccca4185b67de2123563287ba59f7f717368cc70722383b3e","b7250063a1605fc45ce68674b4a6941a8f44cc9493cb9b1f4119c6912042cfee","f3d6a1cacd24d5003fc436351ef263118c0b213481384960ae910400ed0d630c","60d6035a6aa03feac75bcae8b8fca97fbf52823aba81b5cc5c0e921f5527c043","12cd176460fc2e3593aa8056528063470c76d5af93919c6c77797f4298bcbc93","7eda637d5e9f03a2c6ddf6cd8880e7ac96fa17b048ad05213d18a7813d0c2861","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",{"version":"c98a21476edf4bb50ee872b492e70f3a9c407778e276555ea0ee006983f350a8","affectsGlobalScope":true},"726b22a7926e82a6013c11f8de5dfd6ddfb4b830693fa43ac391d2d69a3ad814","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","4812adce4c4e9b4a29f1458737a7e8110cbed3864b94ae8ac975f6d6fbaf7f46","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","33b9bbb39aef6bb880f6abd5e378b0a30f197f1dc1ad37297d62297ea0fead10","7e050b767ed10c7ffbc01f314defbf420bf0b5d54ce666e1c87507c035dfc191","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","baeda1fadac9fd31920480b85340ab9c4266a25ad08403dee8e15fd0751101fb","191c77646c22d3bd17c14c1d9dcc933b8bb133fdbdd42ec122dfeadf2ace8fb8","a6d8bae9447b5b4eedd25570e05c522928dd25dcafaf5458f4d1973ed44fa6e4","67bacfb62a1a36d2000a407ff53f21fe621224315db0c65c709b24da4337513f","48b3008f88017e25fb1c24897c5bb84be9e3526fbe4d688efc83eb98c3a532a3","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c","a376e245f494b58365a4391a2568e6dd9da372c3453f4732eb6e15ebb9038451","ffe8912b7c45288810c870b768190c6c097459930a587dd6ef0d900a5529a811","f53678bdb9f25445c8cdf021f2b003b74fd638e69bb1959dde8e370e8cc1e4fa","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","d6f0afa6352c2b3cb585402ef0acf5daf9adf7090a60d7d2912f52b1ce1d86fd",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","a7b1725842348a2dece056c2183c668da763e1ce693bd32351ee3e21c99903b9","c4ce43b3b7c32abcd80c9cb29940f32811c78a8c40a210a7165ed99ad9008f29","7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","ff17638b6a2b877521f22ff0d96c9f30c8955c935f8c9adf7b67117b6f94833a","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","4001971b90f18161f7bd46d68150d32a5da47e3f177956a267a2b29a2771896a","a0da0fcec2992a88e61efe6f41decf221dd8cefbb93a9bcd3a220f31375d0e61","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","cb18c8bcbfdc551de1258885770cca8c87741fc7a9cfacb53f728b2ceee0a5d5","da33f527710ad7710f3ead36cf024e89f2ee82c861858cb60ee84817281917c1","2c98df0705574220bba64468a18762be95635c1da215b1bf6454c421c1dac987",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"14a6a3cee450438254c004a6b4f1191ec9977186bdeda07764f2a8d90ef71117","e9e43485d935d3550efb41b5be0aaabb7cbe6b0f337c3d6d9df2eb6564c498a7","d86cdb140a3a4fab04c776d3894cef9b2d0e9e42ea38c11ec7c79d2a4245c9ce","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","ef631a14611e5f3697f79d9222634131112a998aa0ad0e85b77aaf45b9ca04ab","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede","725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","725b884357ba84171341a8e4cc08edf11417854fd069842ca6d22afb2e340e45","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a"],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":99,"noImplicitAny":false,"outDir":"./","sourceMap":true,"strict":true,"suppressImplicitAnyIndexErrors":true,"target":2},"fileIdsList":[[33,51,53],[34,35,36,37,38,39,40],[51],[52],[55],[41,51],[42,51],[42,43,44,45,46,47,48,49,50],[34,36,37,38,39,51,54],[147,148],[117,124,133],[109,117,124],[113,118,125],[133],[115,117,124],[117],[117,133,139],[117,124,133,139],[117,118,119,124,133,136,139],[117,119,136,139],[149],[139],[115,117,133],[107],[138],[117,133],[131,140,142],[113,115,124,133],[106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146],[124],[130],[117,133,139,142],[150],[97],[56,62,64,74,82,85,94],[92,93],[56,62,64,74,82,85,87,91],[56,62,64,82,85,87,100],[57,58,59,60,61],[63],[66,86],[56,62,82,85],[56,65],[33,65,68,71],[72],[67],[71,73],[65],[82],[69,70],[96],[56,62],[56,74,82],[33,74,82],[75,76,77,78,79,80,81],[62],[56],[56,65,82],[56,58,59,82,84,95],[88,89,90],[83,84],[56,62,64,82,85,101],[101,102],[56,64,74,82,87,91],[117,150,153]],"referencedMap":[[54,1],[41,2],[35,3],[52,3],[53,4],[56,5],[42,6],[43,7],[51,8],[55,9],[149,10],[109,11],[110,12],[112,13],[113,14],[114,15],[116,16],[117,16],[118,17],[119,18],[120,19],[121,20],[150,21],[122,16],[123,22],[124,23],[127,24],[128,25],[131,26],[132,27],[133,16],[136,28],[147,29],[138,30],[139,31],[141,14],[143,32],[144,14],[151,33],[98,34],[99,34],[95,35],[94,36],[92,37],[93,38],[62,39],[64,40],[87,41],[86,42],[66,43],[72,44],[73,45],[68,46],[74,47],[69,48],[70,49],[71,50],[97,51],[65,51],[80,52],[75,53],[77,54],[82,55],[76,56],[81,57],[78,58],[96,59],[91,60],[88,57],[89,57],[90,57],[85,61],[83,49],[84,52],[102,62],[103,63],[101,64],[154,65]],"exportedModulesMap":[[54,1],[41,2],[35,3],[52,3],[53,4],[56,5],[42,6],[43,7],[51,8],[55,9],[149,10],[109,11],[110,12],[112,13],[113,14],[114,15],[116,16],[117,16],[118,17],[119,18],[120,19],[121,20],[150,21],[122,16],[123,22],[124,23],[127,24],[128,25],[131,26],[132,27],[133,16],[136,28],[147,29],[138,30],[139,31],[141,14],[143,32],[144,14],[151,33],[98,34],[99,34],[95,35],[94,36],[92,37],[93,38],[62,39],[64,40],[87,41],[86,42],[66,43],[72,44],[73,45],[68,46],[74,47],[69,48],[70,49],[71,50],[97,51],[65,51],[80,52],[75,53],[77,54],[82,55],[76,56],[81,57],[78,58],[96,59],[91,60],[88,57],[89,57],[90,57],[85,61],[83,49],[84,52],[102,62],[103,63],[101,64],[154,65]],"semanticDiagnosticsPerFile":[54,34,36,37,40,41,35,38,39,52,53,56,48,42,50,46,43,47,51,44,45,49,55,104,105,148,107,149,108,109,110,111,112,113,114,115,116,117,118,106,145,119,120,121,150,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,147,138,139,140,141,142,146,143,144,151,33,7,8,12,11,3,13,14,15,16,17,18,19,20,4,5,24,21,22,23,25,26,27,6,28,29,30,31,2,1,32,10,9,98,99,95,94,92,93,59,62,57,61,60,58,63,64,87,86,66,72,73,67,68,74,69,70,71,97,65,80,75,77,82,76,79,81,78,96,91,88,89,90,85,83,84,100,102,103,101,152,154,155,156,153,157,158]},"version":"4.4.3"}
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es6.d.ts","../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/axios/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/client-config.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/oidc-endpoints.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/custom-grant-template-tags.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/data.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/parameters.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/scopes.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/environments.d.ts","../node_modules/@asgardeo/auth-js/dist/src/constants/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/client-config.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/data.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/oidc-provider-meta-data.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/token.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/custom-grant.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/id-token.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/authorization-url.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/user.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/crypto.d.ts","../node_modules/@asgardeo/auth-js/dist/src/models/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/data/data-layer.d.ts","../node_modules/@asgardeo/auth-js/dist/src/data/index.d.ts","../node_modules/@asgardeo/auth-js/dist/src/authentication-client.d.ts","../node_modules/@asgardeo/auth-js/dist/src/public-api.d.ts","../node_modules/@asgardeo/auth-js/dist/src/index.d.ts","../src/constants/messages-types.ts","../src/constants/storage.ts","../src/constants/hooks.ts","../src/constants/session-management.ts","../src/constants/parameters.ts","../src/constants/index.ts","../src/exception/exception.ts","../src/exception/index.ts","../src/index.ts","../src/helpers/spa-helper.ts","../src/http-client/helpers/decorators.ts","../src/http-client/helpers/index.ts","../src/http-client/models/axios-http-client.ts","../src/http-client/models/http-client.ts","../src/http-client/models/index.ts","../src/http-client/clients/axios-http-client.ts","../src/http-client/clients/index.ts","../src/http-client/index.ts","../src/models/client.ts","../src/models/message.ts","../src/models/http-client.ts","../src/models/web-worker.ts","../src/models/session-management-helper.ts","../src/models/client-config.ts","../src/models/sign-in.ts","../src/models/index.ts","../src/utils/message-utils.ts","../src/utils/spa-utils.ts","../src/utils/index.ts","../src/helpers/session-management-helper.ts","../src/helpers/index.ts","../src/stores/local-store.ts","../src/stores/memory-store.ts","../src/stores/session-store.ts","../src/stores/index.ts","../src/clients/main-thread-client.ts","../src/clients/web-worker-client.ts","../src/clients/index.ts","../src/client.ts","../src/public-api.ts","../src/index-polyfill.ts","../polyfilled/esm.d.ts","../polyfilled/umd.d.ts","../src/web-worker.d.ts","../src/worker/worker-core.ts","../src/worker/client.worker.ts","../src/worker/index.ts","../node_modules/@types/crypto-js/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/resolve/index.d.ts","../../node_modules/@types/eslint-visitor-keys/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts"],"fileInfos":["721cec59c3fef87aaf480047d821fb758b3ec9482c4129a54631e6e25e432a31",{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"3154a026075044aa102298fe9e6a7a14aaa26a06270680c7478a1765af8ffb09","6009474c65328718bc827d496d956b2fc7e31a3f643e0f260893b7d976619b80","8f1840a1bcc07dff7b2699ee094572773916dba87fc8d117991c4877f3015789","2ec162d98a48073f00821108eec20151906d383665ce91278aed4a1e8c30a199","6d95d47e30b37d6343fbd45412107bf9f15a953b286bd38da70eb2f6be60cfb2","eb0e3a88b1c4129f1b8806e2088ecd5b5bb1d1a642cfaf097599e0962d7ef14f","1408465b7ef31763e5827b443a38d83d125e5d9ccb60ed23c49cbd5e16bb35e4","1d5f29a8df2a26f1f2a27aafc55e89708cb5648a57464d2424eafa795694e188","b769da9db76c0a97e79e482fdb8c16cbfe9858e52b64d29251b9ae5e4c57328c","e00379f171286b46a85b97f8fc212da7317a64776557e91b0f60e3f00aecde13","5d7881988209b37a5e6787510c2827423082a5eff6ebe06c92db73f56b5f877b","9ff732b56ae6ed86f5285789b7db6590eeec4d1723d0aab0030cd0b198501185","a24a235aa6c4de52ec1f80ceddb83e12c068c8dbba57ea953ea9b7718bae96c9","ad0edf9cfc5f54fd128e2741f11007c453fe8891e94203f9e5858d919883071e","f5208dad431ac789aa877218bd9cb927956dd70080be8a6d0ef1bb3338aa8297","6635b93bcfaa940eb5b2ce90bb90bebd6164ed48cf8f18195bdbdbbc6c45f5aa","4d34156f55b9fb5bb8978caa1473d1fa6060aa3ff696e9db78379833f5e32606","6118155581313325dbba17d5749d6afacea297d73330b3b3c00544277b8945d5","be1eb3d1d2134b38e8378537f6a1f3d8ce903099d5ca7a85a3fd8d22ecc2f297","9d34db4a49519acd58bc7ab38efe284d5c8832e20d9771dfa6d4c7a811fa097c","e8c3776e0a629f3ae805d16655d4d3f01d29638b64126361c35b2c95d4c1ca37","0a33fe4f991e14cc2395c4a25192e6b1102ea330691a70ede2bc484a8275674a","4fa26edbe2cd2f0cd5becb3c28f2257fc43fbe3f0cbc1285af2f1f90d5caaab0","16477c5d5d66d2628a79168722da47a27b1f20331418852acccbdbe82294b70c","4246c3200511ea7c1c230549a22d9c0e17b15a8ff0abdde58330ee5b69c0fa4d","c9b106e487f5552eb3854e49bf5956bd90c4c36fb0aeff0cc0b62b5b660eb1cf","bdddc9f1599d1b01c07b5a6e9da4629a58712972797ffc96be3fe5cd178dfa72","9ced747e5c237fb9a51b44ee8811ed66ba3665b362b5bec6e0af6d3b7df01c79","4907ec602d858436363949595419c1bd85d281f503672ab91d898b961beb1ebc","be327204faa5e238e666af2688a6ecfc48bac20ce379a32bee15d98b3d8d6ac3","7e6c0fb9e150f07ca6a9caa7b39aaa840d861a3cf307d8a9b72b5bb55c0ec027","fd1b6953785d5fbde4feda18020a8debdafdd0bd14c332a4178cd245a878e43f","1a5fd7fd06c35fceef3d43a0637fe370bfe1daa82f538b183cb065bb0aec3a78","98c679ad74f5dc65535f79a19f19fa3d1142bbe682792c0584ce1f11824c40b7","7c3ab924fd8494f286ad3966ebbcbcf7fe07d81bc3d928e1800b05d75a7fadac","c241721993235e5b85856909593605f12530c5e366f0456f5cd2158c19dcbad6","6da64e55101ad42112c2f2327c89f16abc5879c56042585882b32610c764778d","ed8d18f4db98a6038b2d818776a23e9d70c1c59b83368af2e5c525d7fea540fe","a21280e001d7c8996040872e63b114ca4d2a94476e0c741ee198248d0d2ddbd6","ce541ae360182b6dfddfe055e4b6c6766bf265209005b0f2ad2f1bc67343a785","d373d738f77efc587af5b7cc4f0072af050dd4a7af7fd404928423052101139f","886f9c6cce85546bd9e7acdb8c3e3642418efe459dcf1f468c4c8ffa279427bd","7b1363d34c6ab656c2fcc728a97873f628402555a9b32374b671c3389af3f848","a120de60b5628d616c2b645e56d7f8739c82c0f50a716652c8be11330cc3b88c","fb2544ad8daefac048e7811908fb7e6eab421d5cde6cb18ed99d1103451d512b","1775b99ab83008a832dcfb3e044fbbee8ffa231e24b062155c7bf49757b34b15","0ca460a52b36e01360909e55f93f88155d956c4d2ccdcefec989290bddddc721","19220cd1cbf685225e3f30f6d909920ed47e2ec5a188a3dd33e3231efc990f5b","e6ef854ad1e937ef95b0ddc9ad7a6c7cf60ca7d37dcd4d2db46e6a22b9921bb3","d93adf1ea2eef8c54cb41fdfb8541c6443725662a1adb5dad80c0dac4d8d61bf","2a3ee5ceba0a31af3ccb8065831a9681fa378f318fdcfbd01d005c6cdcaa6b36","7fbd9b63489c382f4d66c3e446a225313c7c96413aaed65de0b835bb63d79fae","093ceafe704d2244ba3e297d7ce665d7f2e4a7112cf1334a9373b76acb9402a8","d5047c12cbdc4055b1f9c82ad41bbcaae390ea6bdc04b71c996c2bcb35008781","6fdb3f5a7f50a9a330fe71b975d92dad426632931bce0852988dbd727797a8b7","b3643471b0860e55440721bc05499b5c6373d5ad8aad96d429a78484024176a9","789a86243d9f9d1d2816f005c924c07e4054193bcd9a5dccb9b683722251586b","4ac58569ec95e39656dff0a8b5cd43d847bb537d6ebf85c5cfe5fadbfe65cae5","a403cebc4c34b09157a0abdbed93e79e5f4055d36072f858a6db85cb8dea5f12","88db42d3427ec85613355ba5964208799a0124c5f99b97679e58696214255886","f621fa9123ed08490fd45f968239754c2ef9ccfdddfcaf6aabb5ce18f8fb5e26","671315ee8d597ab350f046802451dc7176d8a1aa08580c6d6275aae87bb9f9bb","81c9b2635a893aea965aa3dcdc97d28468d3477941cb5d16a5ba65d38815cf70","d6ce89e3e6f99b71c87dd15606b62e5196ca3f23d78902743770c1ef960cdb06","0d4401a656f3d5480631a345ade69ef23a880ebd4c599f9230d0a3a8cca08253","99fc1afc2ee80d9ccca4185b67de2123563287ba59f7f717368cc70722383b3e","99fc1afc2ee80d9ccca4185b67de2123563287ba59f7f717368cc70722383b3e","b7250063a1605fc45ce68674b4a6941a8f44cc9493cb9b1f4119c6912042cfee","9eac05cbcc270497ba8124b9e54f2b6d3eadd40d1b990dd445d4fdd957f451bf","04a617b6eb8aad21efa86983bdbcf560ce06d427255f9bba6b0408be1cb73461","12cd176460fc2e3593aa8056528063470c76d5af93919c6c77797f4298bcbc93","7eda637d5e9f03a2c6ddf6cd8880e7ac96fa17b048ad05213d18a7813d0c2861","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",{"version":"c98a21476edf4bb50ee872b492e70f3a9c407778e276555ea0ee006983f350a8","affectsGlobalScope":true},"726b22a7926e82a6013c11f8de5dfd6ddfb4b830693fa43ac391d2d69a3ad814","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","4812adce4c4e9b4a29f1458737a7e8110cbed3864b94ae8ac975f6d6fbaf7f46","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","33b9bbb39aef6bb880f6abd5e378b0a30f197f1dc1ad37297d62297ea0fead10","7e050b767ed10c7ffbc01f314defbf420bf0b5d54ce666e1c87507c035dfc191","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","baeda1fadac9fd31920480b85340ab9c4266a25ad08403dee8e15fd0751101fb","191c77646c22d3bd17c14c1d9dcc933b8bb133fdbdd42ec122dfeadf2ace8fb8","a6d8bae9447b5b4eedd25570e05c522928dd25dcafaf5458f4d1973ed44fa6e4","67bacfb62a1a36d2000a407ff53f21fe621224315db0c65c709b24da4337513f","48b3008f88017e25fb1c24897c5bb84be9e3526fbe4d688efc83eb98c3a532a3","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c","a376e245f494b58365a4391a2568e6dd9da372c3453f4732eb6e15ebb9038451","ffe8912b7c45288810c870b768190c6c097459930a587dd6ef0d900a5529a811","f53678bdb9f25445c8cdf021f2b003b74fd638e69bb1959dde8e370e8cc1e4fa","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","d6f0afa6352c2b3cb585402ef0acf5daf9adf7090a60d7d2912f52b1ce1d86fd",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","a7b1725842348a2dece056c2183c668da763e1ce693bd32351ee3e21c99903b9","c4ce43b3b7c32abcd80c9cb29940f32811c78a8c40a210a7165ed99ad9008f29","7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","ff17638b6a2b877521f22ff0d96c9f30c8955c935f8c9adf7b67117b6f94833a","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","4001971b90f18161f7bd46d68150d32a5da47e3f177956a267a2b29a2771896a","a0da0fcec2992a88e61efe6f41decf221dd8cefbb93a9bcd3a220f31375d0e61","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","cb18c8bcbfdc551de1258885770cca8c87741fc7a9cfacb53f728b2ceee0a5d5","da33f527710ad7710f3ead36cf024e89f2ee82c861858cb60ee84817281917c1","2c98df0705574220bba64468a18762be95635c1da215b1bf6454c421c1dac987",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"14a6a3cee450438254c004a6b4f1191ec9977186bdeda07764f2a8d90ef71117","e9e43485d935d3550efb41b5be0aaabb7cbe6b0f337c3d6d9df2eb6564c498a7","d86cdb140a3a4fab04c776d3894cef9b2d0e9e42ea38c11ec7c79d2a4245c9ce","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","ef631a14611e5f3697f79d9222634131112a998aa0ad0e85b77aaf45b9ca04ab","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede","725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","fd326577c62145816fe1acc306c734c2396487f76719d3785d4e825b34540b33","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a"],"options":{"composite":true,"declarationMap":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":99,"noImplicitAny":false,"outDir":"./","sourceMap":true,"strict":true,"suppressImplicitAnyIndexErrors":true,"target":2},"fileIdsList":[[33,51,53],[34,35,36,37,38,39,40],[51],[52],[55],[41,51],[42,51],[42,43,44,45,46,47,48,49,50],[34,36,37,38,39,51,54],[147,148],[117,124,133],[109,117,124],[113,118,125],[133],[115,117,124],[117],[117,133,139],[117,124,133,139],[117,118,119,124,133,136,139],[117,119,136,139],[149],[139],[115,117,133],[107],[138],[117,133],[131,140,142],[113,115,124,133],[106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146],[124],[130],[117,133,139,142],[150],[97],[56,62,64,74,82,85,94],[92,93],[56,62,64,74,82,85,87,91],[56,62,64,82,85,87,100],[57,58,59,60,61],[63],[66,86],[56,62,82,85],[56,65],[33,65,68,71],[72],[67],[71,73],[65],[82],[69,70],[96],[56,62],[56,74,82],[33,74,82],[75,76,77,78,79,80,81],[62],[56],[56,65,82],[56,58,59,82,84,95],[88,89,90],[83,84],[56,62,64,82,85,101],[101,102],[56,62,64,74,82,87,91],[117,118,150,153]],"referencedMap":[[54,1],[41,2],[35,3],[52,3],[53,4],[56,5],[42,6],[43,7],[51,8],[55,9],[149,10],[109,11],[110,12],[112,13],[113,14],[114,15],[116,16],[117,16],[118,17],[119,18],[120,19],[121,20],[150,21],[122,16],[123,22],[124,23],[127,24],[128,25],[131,26],[132,27],[133,16],[136,28],[147,29],[138,30],[139,31],[141,14],[143,32],[144,14],[151,33],[98,34],[99,34],[95,35],[94,36],[92,37],[93,38],[62,39],[64,40],[87,41],[86,42],[66,43],[72,44],[73,45],[68,46],[74,47],[69,48],[70,49],[71,50],[97,51],[65,51],[80,52],[75,53],[77,54],[82,55],[76,56],[81,57],[78,58],[96,59],[91,60],[88,57],[89,57],[90,57],[85,61],[83,49],[84,52],[102,62],[103,63],[101,64],[154,65]],"exportedModulesMap":[[54,1],[41,2],[35,3],[52,3],[53,4],[56,5],[42,6],[43,7],[51,8],[55,9],[149,10],[109,11],[110,12],[112,13],[113,14],[114,15],[116,16],[117,16],[118,17],[119,18],[120,19],[121,20],[150,21],[122,16],[123,22],[124,23],[127,24],[128,25],[131,26],[132,27],[133,16],[136,28],[147,29],[138,30],[139,31],[141,14],[143,32],[144,14],[151,33],[98,34],[99,34],[95,35],[94,36],[92,37],[93,38],[62,39],[64,40],[87,41],[86,42],[66,43],[72,44],[73,45],[68,46],[74,47],[69,48],[70,49],[71,50],[97,51],[65,51],[80,52],[75,53],[77,54],[82,55],[76,56],[81,57],[78,58],[96,59],[91,60],[88,57],[89,57],[90,57],[85,61],[83,49],[84,52],[102,62],[103,63],[101,64],[154,65]],"semanticDiagnosticsPerFile":[54,34,36,37,40,41,35,38,39,52,53,56,48,42,50,46,43,47,51,44,45,49,55,104,105,148,107,149,108,109,110,111,112,113,114,115,116,117,118,106,145,119,120,121,150,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,147,138,139,140,141,142,146,143,144,151,33,7,8,12,11,3,13,14,15,16,17,18,19,20,4,5,24,21,22,23,25,26,27,6,28,29,30,31,2,1,32,10,9,98,99,95,94,92,93,59,62,57,61,60,58,63,64,87,86,66,72,73,67,68,74,69,70,71,97,65,80,75,77,82,76,79,81,78,96,91,88,89,90,85,83,84,100,102,103,101,152,154,155,156,153,157,158]},"version":"4.5.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/auth-spa",
3
- "version": "0.2.12",
3
+ "version": "0.2.16",
4
4
  "description": "Asgardeo Auth SPA SDK to be used in Single-Page Applications.",
5
5
  "keywords": [
6
6
  "Asgardeo",
@@ -15,17 +15,17 @@
15
15
  "scripts": {
16
16
  "lint": "eslint --ext .js,.ts .",
17
17
  "fix-lint": "eslint --ext .js,.ts . --fix",
18
- "build": "cross-env NODE_ENV=production rimraf dist && rimraf umd && npm run type-check && rollup -c",
19
- "build:dev": "cross-env NODE_ENV=development rimraf dist && rimraf umd && npm run type-check && rollup -c",
18
+ "build": "cross-env NODE_ENV=production rimraf dist && rimraf umd && yarn type-check && rollup -c",
19
+ "build:dev": "rimraf dist && rimraf umd && yarn type-check && cross-env NODE_ENV=development rollup -m -c --watch --environment BUILD:development",
20
20
  "type-check": "tsc",
21
- "type-check:watch": "npm run type-check -- --watch",
21
+ "type-check:watch": "yarn type-check -- --watch",
22
22
  "clean": "rimraf dist && rimraf umd && rimraf node_modules",
23
- "prepublish": "npm run build"
23
+ "prepublish": "yarn build"
24
24
  },
25
25
  "author": "Asgardeo",
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@asgardeo/auth-js": "^0.2.16",
28
+ "@asgardeo/auth-js": "0.2.20",
29
29
  "@babel/runtime-corejs3": "^7.11.2",
30
30
  "await-semaphore": "^0.1.3",
31
31
  "axios": "^0.21.0",
package/src/client.ts CHANGED
@@ -45,6 +45,7 @@ import { SPAUtils } from "./utils";
45
45
  */
46
46
  const DefaultConfig: Partial<AuthClientConfig<Config>> = {
47
47
  checkSessionInterval: 3,
48
+ clientHost: origin,
48
49
  enableOIDCSessionManagement: false,
49
50
  sessionRefreshInterval: 300,
50
51
  storage: Storage.SessionStorage
@@ -176,7 +177,7 @@ export class AsgardeoSPAClient {
176
177
  * auth.initialize({
177
178
  * signInRedirectURL: "http://localhost:3000/sign-in",
178
179
  * clientID: "client ID",
179
- * serverOrigin: "https://localhost:9443"
180
+ * serverOrigin: "https://api.asgardeo.io"
180
181
  * });
181
182
  * ```
182
183
  *
@@ -401,11 +402,11 @@ export class AsgardeoSPAClient {
401
402
  * const requestConfig = {
402
403
  * headers: {
403
404
  * "Accept": "application/json",
404
- * "Access-Control-Allow-Origin": "https://localhost:9443/myaccount",
405
+ * "Access-Control-Allow-Origin": "https://api.asgardeo.io/myaccount",
405
406
  * "Content-Type": "application/scim+json"
406
407
  * },
407
408
  * method: "GET",
408
- * url: "https://localhost:9443/scim2/me"
409
+ * url: "https://api.asgardeo.io/scim2/me"
409
410
  * };
410
411
  *
411
412
  * return auth.httpRequest(requestConfig)
@@ -447,7 +448,7 @@ export class AsgardeoSPAClient {
447
448
  * "Content-Type": "application/scim+json"
448
449
  * },
449
450
  * method: "GET",
450
- * url: "https://localhost:9443/scim2/me"
451
+ * url: "https://api.asgardeo.io/scim2/me"
451
452
  * };
452
453
  *
453
454
  * const requestConfig2 = {
@@ -456,7 +457,7 @@ export class AsgardeoSPAClient {
456
457
  * "Content-Type": "application/scim+json"
457
458
  * },
458
459
  * method: "GET",
459
- * url: "https://localhost:9443/scim2/me"
460
+ * url: "https://api.asgardeo.io/scim2/me"
460
461
  * };
461
462
  *
462
463
  * return auth.httpRequest([requestConfig, requestConfig2])
@@ -794,7 +795,7 @@ export class AsgardeoSPAClient {
794
795
  | Hooks.SignOut,
795
796
  callback: (response?: any) => void
796
797
  ): Promise<void>;
797
- public async on(hook: Hooks, callback: (response?: any) => void, id?: string): Promise<void> {
798
+ public async on(hook: Hooks, callback: (response?: any) => void | Promise<void>, id?: string): Promise<void> {
798
799
  await this._isInitialized();
799
800
  if (callback && typeof callback === "function") {
800
801
  switch (hook) {
@@ -902,7 +903,7 @@ export class AsgardeoSPAClient {
902
903
  * const config = {
903
904
  * signInRedirectURL: "http://localhost:3000/sign-in",
904
905
  * clientID: "client ID",
905
- * serverOrigin: "https://localhost:9443"
906
+ * serverOrigin: "https://api.asgardeo.io"
906
907
  * }
907
908
  * const auth.updateConfig(config);
908
909
  * ```
@@ -33,6 +33,7 @@ import {
33
33
  import {
34
34
  CHECK_SESSION_SIGNED_IN,
35
35
  CHECK_SESSION_SIGNED_OUT,
36
+ CUSTOM_GRANT_CONFIG,
36
37
  ERROR,
37
38
  ERROR_DESCRIPTION,
38
39
  PROMPT_NONE_IFRAME,
@@ -86,13 +87,16 @@ export const MainThreadClient = async (
86
87
  );
87
88
 
88
89
  const _httpClient: HttpClientInstance = HttpClient.getInstance();
90
+ let _isHttpHandlerEnabled: boolean = true;
91
+ let _httpErrorCallback: (error: HttpError) => void | Promise<void>;
92
+ let _httpFinishCallback: () => void;
89
93
 
90
94
  const attachToken = async (request: HttpRequestConfig): Promise<void> => {
91
95
  const requestConfig = { attachToken: true, ...request };
92
96
  if (requestConfig.attachToken) {
93
97
  request.headers = {
94
98
  ...request.headers,
95
- Authorization: `Bearer ${ await _authenticationClient.getAccessToken() }`
99
+ Authorization: `Bearer ${await _authenticationClient.getAccessToken()}`
96
100
  };
97
101
  }
98
102
  };
@@ -109,17 +113,18 @@ export const MainThreadClient = async (
109
113
 
110
114
  const setHttpRequestFinishCallback = (callback: () => void): void => {
111
115
  _httpClient?.setHttpRequestFinishCallback && _httpClient.setHttpRequestFinishCallback(callback);
116
+ _httpFinishCallback = callback;
112
117
  };
113
118
 
114
- const setHttpRequestErrorCallback = (callback: (error: HttpError) => void): void => {
115
- _httpClient?.setHttpRequestErrorCallback && _httpClient.setHttpRequestErrorCallback(callback);
119
+ const setHttpRequestErrorCallback = (callback: (error: HttpError) => void | Promise<void>): void => {
120
+ _httpErrorCallback = callback;
116
121
  };
117
122
 
118
123
  const httpRequest = async (requestConfig: HttpRequestConfig): Promise<HttpResponse> => {
119
124
  let matches = false;
120
125
  const config = await _dataLayer.getConfigData();
121
126
 
122
- for (const baseUrl of [ ...((await config?.resourceServerURLs) ?? []), config?.serverOrigin ]) {
127
+ for (const baseUrl of [...((await config?.resourceServerURLs) ?? []), config?.serverOrigin]) {
123
128
  if (requestConfig?.url?.startsWith(baseUrl)) {
124
129
  matches = true;
125
130
 
@@ -133,32 +138,61 @@ export const MainThreadClient = async (
133
138
  .then((response: HttpResponse) => {
134
139
  return Promise.resolve(response);
135
140
  })
136
- .catch((error: HttpError) => {
137
- if (error?.response?.status === 401) {
138
- return _authenticationClient
139
- .refreshAccessToken()
140
- .then(() => {
141
- return _httpClient
142
- .request(requestConfig)
143
- .then((response) => {
144
- return Promise.resolve(response);
145
- })
146
- .catch((error) => {
147
- return Promise.reject(error);
148
- });
149
- })
150
- .catch((refreshError) => {
151
- return Promise.reject(
152
- new AsgardeoSPAException(
153
- "MAIN_THREAD_CLIENT-HR-ES01",
154
- "main-thread-client",
155
- "httpRequest",
156
- "",
157
- "",
158
- refreshError
159
- )
160
- );
161
- });
141
+ .catch(async (error: HttpError) => {
142
+ if (error?.response?.status === 401 || !error?.response) {
143
+ // Try to refresh the token
144
+ let refreshTokenResponse;
145
+ try {
146
+ refreshTokenResponse = await refreshAccessToken();
147
+ } catch (refreshError: any) {
148
+ if (_isHttpHandlerEnabled) {
149
+ if (typeof _httpErrorCallback === "function") {
150
+ await _httpErrorCallback(error);
151
+ }
152
+ if (typeof _httpFinishCallback === "function") {
153
+ _httpFinishCallback();
154
+ }
155
+ }
156
+
157
+ return Promise.reject(
158
+ new AsgardeoSPAException(
159
+ "MAIN_THREAD_CLIENT-HR-ES01",
160
+ "main-thread-client",
161
+ "httpRequest",
162
+ "",
163
+ "",
164
+ refreshError
165
+ )
166
+ );
167
+ }
168
+
169
+ // Retry the request after refreshing the token
170
+ if (refreshTokenResponse) {
171
+ try {
172
+ const httpResponse = await _httpClient.request(requestConfig);
173
+ return Promise.resolve(httpResponse);
174
+ } catch (error: any) {
175
+ if (_isHttpHandlerEnabled) {
176
+ if (typeof _httpErrorCallback === "function") {
177
+ await _httpErrorCallback(error);
178
+ }
179
+ if (typeof _httpFinishCallback === "function") {
180
+ _httpFinishCallback();
181
+ }
182
+ }
183
+
184
+ return Promise.reject(error);
185
+ }
186
+ }
187
+ }
188
+
189
+ if (_isHttpHandlerEnabled) {
190
+ if (typeof _httpErrorCallback === "function") {
191
+ await _httpErrorCallback(error);
192
+ }
193
+ if (typeof _httpFinishCallback === "function") {
194
+ _httpFinishCallback();
195
+ }
162
196
  }
163
197
 
164
198
  return Promise.reject(error);
@@ -171,8 +205,8 @@ export const MainThreadClient = async (
171
205
  "httpRequest",
172
206
  "Request to the provided endpoint is prohibited.",
173
207
  "Requests can only be sent to resource servers specified by the `resourceServerURLs`" +
174
- " attribute while initializing the SDK. The specified endpoint in this request " +
175
- "cannot be found among the `resourceServerURLs`"
208
+ " attribute while initializing the SDK. The specified endpoint in this request " +
209
+ "cannot be found among the `resourceServerURLs`"
176
210
  )
177
211
  );
178
212
  }
@@ -185,7 +219,7 @@ export const MainThreadClient = async (
185
219
  for (const requestConfig of requestConfigs) {
186
220
  let urlMatches = false;
187
221
 
188
- for (const baseUrl of [ ...((await config)?.resourceServerURLs ?? []), config?.serverOrigin ]) {
222
+ for (const baseUrl of [...((await config)?.resourceServerURLs ?? []), config?.serverOrigin]) {
189
223
  if (requestConfig.url?.startsWith(baseUrl)) {
190
224
  urlMatches = true;
191
225
 
@@ -214,35 +248,62 @@ export const MainThreadClient = async (
214
248
  .then((responses: HttpResponse[]) => {
215
249
  return Promise.resolve(responses);
216
250
  })
217
- .catch((error: HttpError) => {
218
- if (error?.response?.status === 401) {
219
- return _authenticationClient
220
- .refreshAccessToken()
221
- .then(() => {
222
- return (
223
- _httpClient.all &&
224
- _httpClient
225
- .all(requests)
226
- .then((response) => {
227
- return Promise.resolve(response);
228
- })
229
- .catch((error) => {
230
- return Promise.reject(error);
231
- })
232
- );
233
- })
234
- .catch((refreshError) => {
235
- return Promise.reject(
236
- new AsgardeoSPAException(
237
- "MAIN_THREAD_CLIENT-HRA-ES01",
238
- "main-thread-client",
239
- "httpRequestAll",
240
- "",
241
- "",
242
- refreshError
243
- )
244
- );
245
- });
251
+ .catch(async (error: HttpError) => {
252
+ if (error?.response?.status === 401 || !error?.response) {
253
+ let refreshTokenResponse;
254
+ try {
255
+ refreshTokenResponse = await _authenticationClient.refreshAccessToken();
256
+ } catch (refreshError: any) {
257
+ if (_isHttpHandlerEnabled) {
258
+ if (typeof _httpErrorCallback === "function") {
259
+ await _httpErrorCallback(error);
260
+ }
261
+ if (typeof _httpFinishCallback === "function") {
262
+ _httpFinishCallback();
263
+ }
264
+ }
265
+
266
+ return Promise.reject(
267
+ new AsgardeoSPAException(
268
+ "MAIN_THREAD_CLIENT-HRA-ES01",
269
+ "main-thread-client",
270
+ "httpRequestAll",
271
+ "",
272
+ "",
273
+ refreshError
274
+ )
275
+ );
276
+ }
277
+
278
+ if (refreshTokenResponse) {
279
+ return _httpClient.all &&
280
+ _httpClient
281
+ .all(requests)
282
+ .then((response) => {
283
+ return Promise.resolve(response);
284
+ })
285
+ .catch(async (error) => {
286
+ if (_isHttpHandlerEnabled) {
287
+ if (typeof _httpErrorCallback === "function") {
288
+ await _httpErrorCallback(error);
289
+ }
290
+ if (typeof _httpFinishCallback === "function") {
291
+ _httpFinishCallback();
292
+ }
293
+ }
294
+
295
+ return Promise.reject(error);
296
+ });
297
+ }
298
+ }
299
+
300
+ if (_isHttpHandlerEnabled) {
301
+ if (typeof _httpErrorCallback === "function") {
302
+ await _httpErrorCallback(error);
303
+ }
304
+ if (typeof _httpFinishCallback === "function") {
305
+ _httpFinishCallback();
306
+ }
246
307
  }
247
308
 
248
309
  return Promise.reject(error);
@@ -256,8 +317,8 @@ export const MainThreadClient = async (
256
317
  "httpRequest",
257
318
  "Request to the provided endpoint is prohibited.",
258
319
  "Requests can only be sent to resource servers specified by the `resourceServerURLs`" +
259
- " attribute while initializing the SDK. The specified endpoint in this request " +
260
- "cannot be found among the `resourceServerURLs`"
320
+ " attribute while initializing the SDK. The specified endpoint in this request " +
321
+ "cannot be found among the `resourceServerURLs`"
261
322
  )
262
323
  );
263
324
  }
@@ -269,12 +330,14 @@ export const MainThreadClient = async (
269
330
 
270
331
  const enableHttpHandler = (): boolean => {
271
332
  _httpClient?.enableHandler && _httpClient.enableHandler();
333
+ _isHttpHandlerEnabled = true;
272
334
 
273
335
  return true;
274
336
  };
275
337
 
276
338
  const disableHttpHandler = (): boolean => {
277
339
  _httpClient?.disableHandler && _httpClient.disableHandler();
340
+ _isHttpHandlerEnabled = false;
278
341
 
279
342
  return true;
280
343
  };
@@ -315,6 +378,7 @@ export const MainThreadClient = async (
315
378
  displayName: "",
316
379
  email: "",
317
380
  sessionState: "",
381
+ sub: "",
318
382
  tenantDomain: "",
319
383
  username: ""
320
384
  });
@@ -383,6 +447,7 @@ export const MainThreadClient = async (
383
447
  displayName: "",
384
448
  email: "",
385
449
  sessionState: "",
450
+ sub: "",
386
451
  tenantDomain: "",
387
452
  username: ""
388
453
  });
@@ -421,7 +486,9 @@ export const MainThreadClient = async (
421
486
  }
422
487
  }
423
488
  }
424
-
489
+ if(config.shouldReplayAfterRefresh) {
490
+ _dataLayer.setTemporaryDataParameter(CUSTOM_GRANT_CONFIG, JSON.stringify(config));
491
+ }
425
492
  if (useDefaultEndpoint || matches) {
426
493
  return _authenticationClient
427
494
  .requestCustomGrant(config)
@@ -445,8 +512,8 @@ export const MainThreadClient = async (
445
512
  "requestCustomGrant",
446
513
  "Request to the provided endpoint is prohibited.",
447
514
  "Requests can only be sent to resource servers specified by the `resourceServerURLs`" +
448
- " attribute while initializing the SDK. The specified token endpoint in this request " +
449
- "cannot be found among the `resourceServerURLs`"
515
+ " attribute while initializing the SDK. The specified token endpoint in this request " +
516
+ "cannot be found among the `resourceServerURLs`"
450
517
  )
451
518
  );
452
519
  }
@@ -456,6 +523,11 @@ export const MainThreadClient = async (
456
523
  return _authenticationClient
457
524
  .refreshAccessToken()
458
525
  .then(() => {
526
+ getCustomGrantConfigData().then((customGrantConfig) => {
527
+ if(customGrantConfig) {
528
+ requestCustomGrant(customGrantConfig)
529
+ }
530
+ })
459
531
  _spaHelper.refreshAccessTokenAutomatically();
460
532
 
461
533
  return _authenticationClient.getBasicUserInfo();
@@ -529,6 +601,7 @@ export const MainThreadClient = async (
529
601
  displayName: "",
530
602
  email: "",
531
603
  sessionState: "",
604
+ sub: "",
532
605
  tenantDomain: "",
533
606
  username: ""
534
607
  });
@@ -640,6 +713,15 @@ export const MainThreadClient = async (
640
713
  }
641
714
  };
642
715
 
716
+ const getCustomGrantConfigData = async (): Promise<AuthClientConfig<CustomGrantConfig> | null> => {
717
+ const configString = await _dataLayer.getTemporaryDataParameter(CUSTOM_GRANT_CONFIG);
718
+ if(configString) {
719
+ return JSON.parse(configString as string);
720
+ } else {
721
+ return null
722
+ }
723
+ };
724
+
643
725
  return {
644
726
  disableHttpHandler,
645
727
  enableHttpHandler,