Skip to content

Commit e9b2990

Browse files
coolbuebporcellusniftyvictorbcbogdan
authored
feat: Experimental plugin support [v0.50.0] (#909)
* feat: initial plugin experiments * feat(plugins): moving plugins into experimental * feat(plugins): add global config override * chore: update web-js version to published canary * added support for export and init to plugins * prevent caching to allow working with symlinks * add fallback for route handlers * improve typing, pass corect data and fix overrides not working * chore: remove unused plugin loading and cleanup * feat: add isRecipeInitialized method and enhance public config handling * feat(multifactorauth): add getSecondaryFactors to multifactor recipe method and enhance error handling for plugin version mismatches and duplicates * chore: revert changes with plugin config * feat: add translations support * feat: enhance public config handling with normalized app info and improve types * webauthn fixes * merge and build fixes * refactor: remove appInfo from pluginConfig when overriding config * feat: translation function to support key replacements * feat: add WebAuthn credential management methods * chore: test fixes * fix: better version checking for plugins * build fixes * chore: err message fix * refactor: unify SuperTokensPlugin type with web-js version for consistency * chore: revert plugin type changes * feat: renamed `registerCredential` to `createCredential` and added `registerCredentialWithUser` method for user-specific credential registration * chore: build updates * fix: added missing exports * improv: Add the ability to customize the footer for the captcha plugin * fix: update build files * refactor: revert noop change * refactor: consistency fix * chore: update web-js version --------- Co-authored-by: Mihaly Lengyel <[email protected]> Co-authored-by: Victor Bojica <[email protected]> Co-authored-by: Bogdan Carpusor <[email protected]>
1 parent 4571189 commit e9b2990

File tree

131 files changed

+8617
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+8617
-627
lines changed

.github/workflows/auth-react-test-1.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- uses: supertokens/actions/get-versions-from-repo@main
3434
id: node-versions
3535
with:
36-
repo: supertokens-node
37-
github-token: ${{ secrets.GITHUB_TOKEN }}
38-
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
36+
repo: supertokens-node
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
fdi-versions: ${{ steps.versions.outputs.fdiVersions }}
3939

4040
setup-auth-react:
4141
runs-on: ubuntu-latest
@@ -59,8 +59,8 @@ jobs:
5959
steps:
6060
- id: repo-versions
6161
run: |
62-
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
63-
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
62+
nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
63+
echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
6464
6565
# We will use this in the test run to get the core version
6666
- uses: actions/checkout@v4

.github/workflows/auth-react-test-2.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ jobs:
8080
- uses: supertokens/actions/get-versions-from-repo@main
8181
id: core-versions
8282
with:
83-
repo: supertokens-core
84-
github-token: ${{ secrets.GITHUB_TOKEN }}
85-
cdi-versions: ${{ steps.node-cdi-versions.outputs.cdiVersions }}
83+
repo: supertokens-core
84+
github-token: ${{ secrets.GITHUB_TOKEN }}
85+
cdi-versions: ${{ steps.node-cdi-versions.outputs.cdiVersions }}
8686

8787
- name: Get core version from latest Node CDI version
8888
id: core-version
8989
run: |
90-
lastNodeCdiVersion=$(echo '${{ steps.node-cdi-versions.outputs.cdiVersions }}' | jq -r '.[-1]') | sed -e 's/"/\\"/g'
91-
coreVersion=$(echo '${{ steps.core-versions.outputs.cdiVersions }}' | jq -r ".[$lastNodeCdiVersion]")
90+
lastNodeCdiVersion=$(echo '${{ steps.node-cdi-versions.outputs.cdiVersions }}' | jq -r '.[-1]') | sed -e 's/"/\\"/g'
91+
coreVersion=$(echo '${{ steps.core-versions.outputs.cdiVersions }}' | jq -r ".[$lastNodeCdiVersion]")
9292
93-
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
93+
echo "coreVersion=${coreVersion}" >> $GITHUB_OUTPUT
9494
9595
- name: Start core
9696
run: docker compose up --wait

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Add WebAuthn credential management methods: `listCredentials`, `removeCredential`
1313
- Added `createAndRegisterCredentialWithUser` method that creates and registers a credential with a user
1414
- Adds dev/release GHA pipelines
15+
- Adds experimental support for plugins
1516

1617
### Breaking changes
1718

lib/build/components/componentOverride/genericComponentOverrideContext.d.ts

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

lib/build/emailpassword-shared2.js

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

lib/build/emailpassword-shared6.js

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

lib/build/emailpassword.js

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

lib/build/emailpasswordprebuiltui.js

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

lib/build/emailverification-shared.js

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

lib/build/emailverification-shared2.js

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

0 commit comments

Comments
 (0)