-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Turnstile #36
Add Turnstile #36
Conversation
Deploying locyanfrp-panel-preview with Cloudflare Pages
|
src/views/auth/LoginView.vue
Outdated
// window.location.host + | ||
// '/auth/login' | ||
// } | ||
watch(token, (oldToken, newToken) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using watch
hook is not a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Astrian/cfturnstile-vue3 offered a callback event, which allows us avoid the use of watch
hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've already tested this package, it can't reset the captcha widget after the n-model re-rendered, will case unexpectedly behavior.
@@ -33,6 +33,7 @@ | |||
"vue-native-websocket": "^2.0.15", | |||
"vue-route": "^1.5.1", | |||
"vue-router": "^4.4.5", | |||
"vue-turnstile": "^1.0.11", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using https://github.com/Astrian/cfturnstile-vue3
vue-turnstile is designed for Vue 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/ruigomeseu/vue-turnstile
It's designed for Vue 3 instead of Vue 2, if you have any questions about the Options API, please refer to: https://cn.vuejs.org/guide/introduction.html#options-api
See LoCyan-Team/LoCyanFrpAPI-v2#21