Skip to content

Commit

Permalink
Add audit logging advice
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Oct 12, 2024
1 parent cf684f6 commit 38d111e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ omniauth_identities_provider_column :provider
omniauth_identities_uid_column :uid
```

### Audit logging

If you're using the `audit_logging` feature, it can be useful to include the external provider name in the `login` audit logs:

```rb
audit_log_metadata_for :login do
{ "provider" => omniauth_provider } if authenticated_by.include?("omniauth")
end
```

## Base

The `omniauth` feature builds on top of the `omniauth_base` feature, which sets up OmniAuth and routes its requests, but has no interaction with the database. So, if you would prefer to handle external logins differently, you can load just the `omniauth_base` feature, and implement your own callback phase.
Expand Down

0 comments on commit 38d111e

Please sign in to comment.