Skip to content

Commit fda77e1

Browse files
feat: xmlhttprequest interception (#153)
* adds interceptor skeleton for xmlhttprequest * new approach to interception * adds interceptor for sending and getting response * implements things to do before sending the request * adds a common handle response handler * adds a lot of the code for handling response * maybe fixes an issue with axios interceptor * adds initial attempt at refreshing * adds a few todos * gets refreshing test to pass * adds a todo * adds logic for how to handle refresh returning session expired * fixes more tests * gets axios 2 tests to pass * removes unnecessary function * refactor: cleanup, minor fixes and re-enabling tests * feat: re-added init check into attemptRefreshingSession * feat(XHR): intercept angular httpclient and add generic tests * feat(XHR interception): finishing tests & fixes * chore: update changelog, size limit + remove unused func Co-authored-by: Mihaly Lengyel <[email protected]>
1 parent 15e332c commit fda77e1

31 files changed

+56780
-325
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10+
### Added
11+
12+
- Adding an interceptor for XMLHttpRequest by default upon initializing SuperTokens
13+
- Marked `addAxiosInterceptors` as deprecated
14+
- Request interception can now be disabled by adding `superTokensDoNotDoInterception` to the hash of the request (works as a queryparam as well)
15+
1016
## [13.1.1] - 2022-10-14
1117

1218
- Removed default max age from claims

bundle/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/axios.js

Lines changed: 23 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/fetch.d.ts

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/fetch.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/index.d.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/index.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipeImplementation.js

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/types.d.ts

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/utils/index.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)