* feat: Add API token generation and authentication
This commit introduces API token generation and authentication for write operations.
- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.
* feat: Add API token generation and authentication
This commit introduces API token generation and authentication for write operations.
- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.
* Mark as editable
* Refactor
* WIP - Authentication
* Implement more test coverage
* Split 401 and 403
* Before Create hooks
* Update harvest specs, defaulting to the first plant part - this may not be right
* Update coverage
* Update coverage
* Rubocop
* Rubocop
* Rubocop
* Fix coverage
* For now, mark photos immutable again
* Fix specs
* Fix specs
* Rubocop
* Fix specs
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
This change removes the twitter authentication feature from the application.
It removes the `omniauth-twitter` gem and all related code from controllers, views, and tests. It also removes the twitter icon and environment variable settings.
* add recaptcha on register view
Update new.html.haml to add it
* Update Gemfile to add recaptcha
* Update env-example to show recaptcha
* More view corrections for recaptcha
* Update registrations_controller.rb to add recaptcha
* Update env-example with test config
* Recaptcha help text
* Fix trailing spaces
* Fix trailing space
* Add Recaptcha to gemfile.lock
* Fixing Gemfile.lock space
* Typo on comments in view
* Update app/views/devise/registrations/new.html.haml
* Fix signup
---------
Co-authored-by: Cesy <cesy.avon@gmail.com>
Had to add some Devise crud based on advice on their wiki, otherwise
you couldn't change your settings without changing your password.
Also had to make a hidden field for tos_agreement. I don't really love
it but nobody seems to be able to recommend a better way.