Skip to content

Commit

Permalink
Make timestamps configuration clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Nov 18, 2024
1 parent c77a55e commit 1287b83
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,16 @@ Currently, provider login is required to return the user's email address, and ac

### Timestamps

If you'll be adding created/updated timestamps to the identities table, also add these lines to your Rodauth configuration:
If you want to know when an external identity was used first or last, you may want to add timestamp columns to the identities table:

```rb
create_table :account_identities do |t|
# ...
t.timestamps
end
```

In that case, you'll need to make sure the column values are populated on create/update:

```rb
omniauth_identity_insert_hash { super().merge(created_at: Time.now) }
Expand Down

0 comments on commit 1287b83

Please sign in to comment.