-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat: add turnstile support #1094
Merged
Merged
Conversation
This file contains 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
hf
approved these changes
May 1, 2023
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.
Sorry I reviewed it but seem to have forgotten to leave the review approval.
kangmingtay
approved these changes
May 2, 2023
🎉 This PR is included in version 2.62.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
## Overview Captcha providers are treated as generic in this PR. Users can swap out the provider which in turn swaps out only the `siteverify` URL. This approach generally works fine when considering `turnstile` and `hcaptcha` since both have similar feature sets. However, for other providers like `recaptcha` users might want to use specialized features such as Android recaptcha and recaptcha V3 score. Since the [responses slightly differ between an android response and a generic response](https://developers.google.com/recaptcha/docs/verify), we may need to introduce separate structs. Another alternative considered was to initialize a new provider type for each methods (similar to `SMSProvider`) and have corresponding `verifyCaptcha` methods for each provider. This way there is clear separation of decoding logic for response types for each provider but there will be slightly more code to maintain. ### TODOs: - [x] Manual testing with FE components After PR: - Update dashboard to reflect additional provider - Update [hcaptcha docs](https://supabase.com/docs/guides/auth/auth-captcha) --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
## Overview Captcha providers are treated as generic in this PR. Users can swap out the provider which in turn swaps out only the `siteverify` URL. This approach generally works fine when considering `turnstile` and `hcaptcha` since both have similar feature sets. However, for other providers like `recaptcha` users might want to use specialized features such as Android recaptcha and recaptcha V3 score. Since the [responses slightly differ between an android response and a generic response](https://developers.google.com/recaptcha/docs/verify), we may need to introduce separate structs. Another alternative considered was to initialize a new provider type for each methods (similar to `SMSProvider`) and have corresponding `verifyCaptcha` methods for each provider. This way there is clear separation of decoding logic for response types for each provider but there will be slightly more code to maintain. ### TODOs: - [x] Manual testing with FE components After PR: - Update dashboard to reflect additional provider - Update [hcaptcha docs](https://supabase.com/docs/guides/auth/auth-captcha) --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
## Overview Captcha providers are treated as generic in this PR. Users can swap out the provider which in turn swaps out only the `siteverify` URL. This approach generally works fine when considering `turnstile` and `hcaptcha` since both have similar feature sets. However, for other providers like `recaptcha` users might want to use specialized features such as Android recaptcha and recaptcha V3 score. Since the [responses slightly differ between an android response and a generic response](https://developers.google.com/recaptcha/docs/verify), we may need to introduce separate structs. Another alternative considered was to initialize a new provider type for each methods (similar to `SMSProvider`) and have corresponding `verifyCaptcha` methods for each provider. This way there is clear separation of decoding logic for response types for each provider but there will be slightly more code to maintain. ### TODOs: - [x] Manual testing with FE components After PR: - Update dashboard to reflect additional provider - Update [hcaptcha docs](https://supabase.com/docs/guides/auth/auth-captcha) --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Captcha providers are treated as generic in this PR. Users can swap out the provider which in turn swaps out only the
siteverify
URL. This approach generally works fine when consideringturnstile
andhcaptcha
since both have similar feature sets.However, for other providers like
recaptcha
users might want to use specialized features such as Android recaptcha and recaptcha V3 score. Since the responses slightly differ between an android response and a generic response, we may need to introduce separate structs.Another alternative considered was to initialize a new provider type for each methods (similar to
SMSProvider
) and have correspondingverifyCaptcha
methods for each provider. This way there is clear separation of decoding logic for response types for each provider but there will be slightly more code to maintain.TODOs:
After PR: