Skip to content

Commit

Permalink
Merge branch '16.3' into feat/mfa/base
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Oct 24, 2023
2 parents 5297aef + 02c2958 commit 847725e
Show file tree
Hide file tree
Showing 225 changed files with 3,580 additions and 806 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test-edge-function.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Test edge function compatibility"
on: push
jobs:
test:
runs-on: ubuntu-latest
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.netlify_auth_token }}
NETLIFY_SITE_ID: ${{ secrets.netlify_site_id }}
TEST_DEPLOYED_VERSION: true
defaults:
run:
working-directory: examples/next/with-emailpassword
steps:
- uses: actions/checkout@v2
- run: echo $GITHUB_REF_NAME
- run: npm install git+https://github.com:supertokens/supertokens-node.git#$GITHUB_SHA
- run: npm install
- run: npm install mocha@6.1.4 jsdom-global@3.0.2 puppeteer@^11.0.0 isomorphic-fetch@^3.0.0
- run: netlify deploy --alias 0 --build --json --auth=$NETLIFY_AUTH_TOKEN > deployInfo.json
- run: cat deployInfo.json
- run: |
( \
(echo "=========== Test attempt 1 ===========" && npx mocha --no-config --timeout 80000 test/**/*.test.js) || \
(echo "=========== Test attempt 2 ===========" && npx mocha --no-config --timeout 80000 test/**/*.test.js) || \
(echo "=========== Test attempt 3 ===========" && npx mocha --no-config --timeout 80000 test/**/*.test.js) \
)
- name: The job has failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: screenshots
path: |
./**/*screenshot.jpeg
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ coreDriverInterfaceSupported.json
examples/
add-ts-no-check.js
docs/
.prettierignore
.prettierignore
updateLibInExample
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [16.3.4] - 2023-10-22

### Fixes

- Fixes an issue where sometimes the `Access-Control-Expose-Headers` header value would contain duplicates

## [16.3.3] - 2023-10-19

- Tests `null` values in `ProviderConfig` saved in core

## [16.3.2] - 2023-10-16

### Fixes

- `getUsersNewestFirst` and `getUsersOldestFirst` will now properly filter users by tenantId.
- Fixes issue with missed email verification claim update that caused the frontend pre built UI to call the email verify API multiple times.

## [16.3.1] - 2023-10-12

### Fixes

- Handle AWS Public URLs (ending with `.amazonaws.com`) separately while extracting TLDs for SameSite attribute.

## [16.3.0] - 2023-10-10

### Added

- Adds support for configuring multiple frontend domains to be used with the same backend
- Added a new `origin` property to `appInfo`, this can be configured to be a function which allows you to conditionally return the value of the frontend domain. This property will replace `websiteDomain` in a future release of `supertokens-node`
- `websiteDomain` inside `appInfo` is now optional. Using `origin` is recommended over using `websiteDomain`. This is not a breaking change and using `websiteDomain` will continue to work
- Added a "custom" framework you can use in framework normally not supported by our SDK
- Added a next13 app router compatible request handler.

### Fixed

- Fixed an issue where calling signinup for thirdparty recipe would result in a "clone is not a function" error

### Changes

- Using built-in fetch whenever available instead of cross-fetch
- Improved edge-function support

## [16.2.1] - 2023-10-06

- Slight refactors logic to code for social providers to make it consistent across all providers

## [16.2.0] - 2023-09-29

### Changes
Expand Down Expand Up @@ -90,6 +136,10 @@ Because of account linking we've introduced a new Primary user concept (see abov
- returns new `recipeUserId` prop in the `status: OK` case
- `signUp`:
- returns new `recipeUserId` prop in the `status: OK` case
- `resetPasswordUsingToken`:
- removed from the recipe interface, making it no longer overrideable (directly)
- the related function in the index files now call `consumePasswordResetToken` and `updateEmailOrPassword`
- any necessary behaviour changes can be achieved by overriding those two function instead
- `signInPOST`:
- can return status `SIGN_IN_NOT_ALLOWED`
- `signUpPOST`:
Expand Down Expand Up @@ -150,6 +200,10 @@ Because of account linking we've introduced a new Primary user concept (see abov
- `updateEmailOrPassword` :
- now takes `recipeUserId` instead of `userId`
- can return the new `EMAIL_CHANGE_NOT_ALLOWED_ERROR` status
- `resetPasswordUsingToken`:
- removed from the recipe interface, making it no longer overrideable (directly)
- the related function in the index files now call `consumePasswordResetToken` and `updateEmailOrPassword`
- any necessary behaviour changes can be achieved by overriding those two function instead
- added an overrideable `createNewEmailPasswordRecipeUser` function that is called during sign up and in the “invitation link” flow
- `emailPasswordSignIn`:
- returns new `recipeUserId` prop in the `status: OK` case
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ You will need to setup the `supertokens-core` in order to to run the `supertoken
5. If all tests pass the output should be:
![node tests passing](https://github.com/supertokens/supertokens-logo/blob/master/images/supertokens-node-tests-passing.png)

### To be able to run and debug tests from vscode

1. Install the extension - https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter
2. Add the following to your vscode settings:
```json
{
// ...,
"mochaExplorer.env": {
"TEST_MODE": "testing",
"INSTALL_PATH": "../supertokens-root"
}
}
```
3. In `lib/tsconfig.json`, change `"sourceMap"` to `true`
4. Run `npm run build`

You should now be able to see tests on the VSCode's testing panel and run/debug from there.

## Pull Request

1. Before submitting a pull request make sure all tests have passed
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/framework.BaseRequest.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/framework.BaseResponse.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/classes/framework_custom.CollectingResponse.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/classes/framework_custom.PreParsedRequest.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/index.RecipeUserId.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/index.User.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/index.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/ingredients_emaildelivery.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/ingredients_smsdelivery.default.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/classes/recipe_accountlinking.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_dashboard.default.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/recipe_emailpassword.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_emailverification.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_jwt.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_multitenancy.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_openid.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_passwordless.default.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/classes/recipe_session.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdparty.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdpartyemailpassword.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_thirdpartypasswordless.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_usermetadata.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/classes/recipe_userroles.default.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ <h2>Authors</h2>
</a>
<p>Created with :heart: by the folks at supertokens.com.</p>
<p><a href="https://openbase.com/js/supertokens-node?utm_source=embedded&amp;utm_medium=badge&amp;utm_campaign=rate-badge"><img src="https://badges.openbase.com/js/featured/supertokens-node.svg?style=openbase&token=ficVFymu0SAHNI+0JUEDA2pHn93FLoj8k0VayFpvZ3Y=" alt="Featured on Openbase"></a></p>
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="modules/framework.html">framework</a></li><li class=" tsd-kind-module"><a href="modules/framework_awsLambda.html">framework/aws<wbr/>Lambda</a></li><li class=" tsd-kind-module"><a href="modules/framework_express.html">framework/express</a></li><li class=" tsd-kind-module"><a href="modules/framework_fastify.html">framework/fastify</a></li><li class=" tsd-kind-module"><a href="modules/framework_hapi.html">framework/hapi</a></li><li class=" tsd-kind-module"><a href="modules/framework_koa.html">framework/koa</a></li><li class=" tsd-kind-module"><a href="modules/framework_loopback.html">framework/loopback</a></li><li class=" tsd-kind-module"><a href="modules/index.html">index</a></li><li class=" tsd-kind-module"><a href="modules/ingredients_emaildelivery.html">ingredients/emaildelivery</a></li><li class=" tsd-kind-module"><a href="modules/ingredients_smsdelivery.html">ingredients/smsdelivery</a></li><li class=" tsd-kind-module"><a href="modules/recipe_accountlinking.html">recipe/accountlinking</a></li><li class=" tsd-kind-module"><a href="modules/recipe_dashboard.html">recipe/dashboard</a></li><li class=" tsd-kind-module"><a href="modules/recipe_emailpassword.html">recipe/emailpassword</a></li><li class=" tsd-kind-module"><a href="modules/recipe_emailverification.html">recipe/emailverification</a></li><li class=" tsd-kind-module"><a href="modules/recipe_jwt.html">recipe/jwt</a></li><li class=" tsd-kind-module"><a href="modules/recipe_multitenancy.html">recipe/multitenancy</a></li><li class=" tsd-kind-module"><a href="modules/recipe_openid.html">recipe/openid</a></li><li class=" tsd-kind-module"><a href="modules/recipe_passwordless.html">recipe/passwordless</a></li><li class=" tsd-kind-module"><a href="modules/recipe_session.html">recipe/session</a></li><li class=" tsd-kind-module"><a href="modules/recipe_thirdparty.html">recipe/thirdparty</a></li><li class=" tsd-kind-module"><a href="modules/recipe_thirdpartyemailpassword.html">recipe/thirdpartyemailpassword</a></li><li class=" tsd-kind-module"><a href="modules/recipe_thirdpartypasswordless.html">recipe/thirdpartypasswordless</a></li><li class=" tsd-kind-module"><a href="modules/recipe_usermetadata.html">recipe/usermetadata</a></li><li class=" tsd-kind-module"><a href="modules/recipe_userroles.html">recipe/userroles</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li><li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li><li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li><li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="modules/framework.html">framework</a></li><li class=" tsd-kind-module"><a href="modules/framework_awsLambda.html">framework/aws<wbr/>Lambda</a></li><li class=" tsd-kind-module"><a href="modules/framework_custom.html">framework/custom</a></li><li class=" tsd-kind-module"><a href="modules/framework_express.html">framework/express</a></li><li class=" tsd-kind-module"><a href="modules/framework_fastify.html">framework/fastify</a></li><li class=" tsd-kind-module"><a href="modules/framework_hapi.html">framework/hapi</a></li><li class=" tsd-kind-module"><a href="modules/framework_koa.html">framework/koa</a></li><li class=" tsd-kind-module"><a href="modules/framework_loopback.html">framework/loopback</a></li><li class=" tsd-kind-module"><a href="modules/index.html">index</a></li><li class=" tsd-kind-module"><a href="modules/ingredients_emaildelivery.html">ingredients/emaildelivery</a></li><li class=" tsd-kind-module"><a href="modules/ingredients_smsdelivery.html">ingredients/smsdelivery</a></li><li class=" tsd-kind-module"><a href="modules/recipe_accountlinking.html">recipe/accountlinking</a></li><li class=" tsd-kind-module"><a href="modules/recipe_dashboard.html">recipe/dashboard</a></li><li class=" tsd-kind-module"><a href="modules/recipe_emailpassword.html">recipe/emailpassword</a></li><li class=" tsd-kind-module"><a href="modules/recipe_emailverification.html">recipe/emailverification</a></li><li class=" tsd-kind-module"><a href="modules/recipe_jwt.html">recipe/jwt</a></li><li class=" tsd-kind-module"><a href="modules/recipe_multitenancy.html">recipe/multitenancy</a></li><li class=" tsd-kind-module"><a href="modules/recipe_openid.html">recipe/openid</a></li><li class=" tsd-kind-module"><a href="modules/recipe_passwordless.html">recipe/passwordless</a></li><li class=" tsd-kind-module"><a href="modules/recipe_session.html">recipe/session</a></li><li class=" tsd-kind-module"><a href="modules/recipe_thirdparty.html">recipe/thirdparty</a></li><li class=" tsd-kind-module"><a href="modules/recipe_thirdpartyemailpassword.html">recipe/thirdpartyemailpassword</a></li><li class=" tsd-kind-module"><a href="modules/recipe_thirdpartypasswordless.html">recipe/thirdpartypasswordless</a></li><li class=" tsd-kind-module"><a href="modules/recipe_usermetadata.html">recipe/usermetadata</a></li><li class=" tsd-kind-module"><a href="modules/recipe_userroles.html">recipe/userroles</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li><li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li><li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li><li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
2 changes: 1 addition & 1 deletion docs/interfaces/framework_awsLambda.SessionEvent.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/framework_awsLambda.SessionEventV2.html

Large diffs are not rendered by default.

Loading

0 comments on commit 847725e

Please sign in to comment.