-
Notifications
You must be signed in to change notification settings - Fork 597
refactor(client): migrate captcha flow to betterCaptcha adapter model #3442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lizheming
wants to merge
19
commits into
main
Choose a base branch
from
codex/refactor-@waline/client-to-use-better-captcha
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9820d8d
refactor(client): unify captcha handling with betterCaptcha config
lizheming 51a6e67
refactor(admin): align captcha flow with betterCaptcha config
lizheming 83ae92f
chore: refactor with better-captcha module
lizheming 192669b
chore: use @better-captcha/react refact admin captcha
lizheming 93bde2a
chore: update config
lizheming 8ccf581
chore: update better-captcha config key
lizheming ad807af
chore: update admin react component
lizheming 02bd8f5
chore: remove log
lizheming fe488d0
chore: remove unused var
lizheming 92a2c81
chore: udpate captcah
lizheming 1532132
chore: update type
lizheming 774d235
chore: close some lint rule
lizheming a58e09e
Update packages/server/src/middleware/dashboard.js
lizheming 9889300
Update packages/client/src/components/CommentBox.vue
lizheming d51f3ff
fix: add @better-captcha/vue to external and promote to runtime depen…
Copilot 8a946d2
Merge branch 'codex/refactor-@waline/client-to-use-better-captcha' of…
lizheming 6b92f6c
fix: fix lint
lizheming be9449e
chore: update lock file
lizheming f984a53
Merge branch 'main' into codex/refactor-@waline/client-to-use-better-…
lizheming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { RecaptchaV3 as Recaptcha } from '@better-captcha/react/provider/recaptcha-v3'; | ||
| import { Turnstile } from '@better-captcha/react/provider/turnstile'; | ||
|
|
||
| export const CaptchaProviders = { | ||
| recaptchaV3: Recaptcha, | ||
| turnstile: Turnstile, | ||
| }; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| export default function () { | ||
| if (window.captcha) { | ||
| return window.captcha; | ||
| } | ||
|
|
||
| if (window.recaptchaV3Key) { | ||
| return { | ||
| provider: 'recaptchaV3', | ||
| sitekey: window.recaptchaV3Key, | ||
|
lizheming marked this conversation as resolved.
|
||
| }; | ||
| } | ||
|
|
||
| if (window.turnstileKey) { | ||
| return { | ||
| provider: 'turnstile', | ||
| sitekey: window.turnstileKey, | ||
| }; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.