README.md in authtrail-0.3.1 vs README.md in authtrail-0.4.0
- old
+ new
@@ -1,9 +1,11 @@
# AuthTrail
Track Devise login activity
+**AuthTrail 0.4.0 was recently released** - see [how to upgrade](#upgrading)
+
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
[![Build Status](https://github.com/ankane/authtrail/workflows/build/badge.svg?branch=master)](https://github.com/ankane/authtrail/actions)
## Installation
@@ -26,10 +28,12 @@
```sh
rails generate authtrail:install
rails db:migrate
```
+To enable geocoding, see the [Geocoding section](#geocoding).
+
## How It Works
A `LoginActivity` record is created every time a user tries to login. You can then use this information to detect suspicious behavior. Data includes:
- `scope` - Devise scope
@@ -102,13 +106,19 @@
## Geocoding
AuthTrail uses [Geocoder](https://github.com/alexreisner/geocoder) for geocoding. We recommend configuring [local geocoding](#local-geocoding) or [load balancer geocoding](#load-balancer-geocoding) so IP addresses are not sent to a 3rd party service. If you do use a 3rd party service and adhere to GDPR, be sure to add it to your subprocessor list.
-To enable geocoding, update `config/initializers/authtrail.rb`:
+To enable geocoding, add this line to your application’s Gemfile:
```ruby
+gem 'geocoder'
+```
+
+And update `config/initializers/authtrail.rb`:
+
+```ruby
AuthTrail.geocode = true
```
Geocoding is performed in a background job so it doesn’t slow down web requests. Set the job queue with:
@@ -177,9 +187,21 @@
We recommend using this in addition to Devise’s `Lockable` module and [Rack::Attack](https://github.com/kickstarter/rack-attack).
Check out [Hardening Devise](https://ankane.org/hardening-devise) and [Secure Rails](https://github.com/ankane/secure_rails) for more best practices.
## Upgrading
+
+### 0.4.0
+
+There are two notable changes to geocoding:
+
+1. Geocoding is now disabled by default (this was already the case for new installations with 0.3.0+). Check out the instructions for [how to enable it](#geocoding) (you may need to create `config/initializers/authtrail.rb`).
+
+2. The `geocoder` gem is now an optional dependency. To use geocoding, add it to your Gemfile:
+
+ ```ruby
+ gem 'geocoder'
+ ```
### 0.2.0
To store latitude and longitude, create a migration with: