-
Notifications
You must be signed in to change notification settings - Fork 18
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 recaptcha functionality to API registration #574
Merged
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
925b877
wip: add nlwstein/recaptcha fork temporarily to support recaptcha fea…
nlwstein fc3fc03
wip: basic recaptcha functionality
nlwstein 7219602
wip: resolve credo complaints
nlwstein 41dda13
wip: better error handling, passes dialyzer
nlwstein c0a5c54
wip: remove js disable
nlwstein 0358fc1
wip: better formatting for recaptcha
nlwstein 29cc03c
Update apps/api_web/lib/api_web/templates/client_portal/user/_new.htm…
nlwstein 2d770e6
wip: revert default-src
nlwstein d9ff22b
wip: attempt to use specific commit on original repo
nlwstein 5f44334
wip: use with statement for recaptcha logic
nlwstein ac6ce1a
Merge branch 'master' into nlws-registration-recaptcha
nlwstein 0bfadd9
Merge branch 'master' into nlws-registration-recaptcha
nlwstein 40beccb
wip: only show recaptcha when MIX_ENV is prod
nlwstein 21b1e82
wip: added feature flag and moved env var loading
nlwstein e3153e8
chore: apply formatter
nlwstein f1b117b
wip: better dev mode behavior, added changeset preservation when fail…
nlwstein e193989
wip: disable submit until recaptcha complete
nlwstein 66f5ebc
wip: move function definition so the higher specificity one comes first
nlwstein d3c2654
Update apps/api_web/lib/api_web/controllers/portal/user_controller.ex
nlwstein 289944e
test: ensure recaptcha widget is displayed when feature is enabled
nlwstein bd56f9c
test: add testing credentials for recaptcha
nlwstein 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
There are no files selected for viewing
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
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
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
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
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
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
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.
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.
suggestion: for dynamic configuration, we typically load it using
System.get_env/2
inconfig/runtime.exs
now.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 added the env vars to that file, and added a feature flag to disable the recaptcha code outside of prod builds.
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 added some frontend code to only enable the submit button once the user completes the recaptcha, so this won't happen outside of someone attempting to do something weird.
Deployed to dev-green 🙂