@@ -36,13 +36,13 @@ This gem is compatible with, as of Feb 2021, version 3:
36
36
To acquire the latest release from RubyGems add the following to your ` Gemfile ` :
37
37
38
38
``` ruby
39
- gem ' omniauth-identity'
39
+ gem " omniauth-identity"
40
40
```
41
41
42
42
If the git repository has new commits not yet in an official release, simply specify the repo instead:
43
43
44
44
``` ruby
45
- gem ' omniauth-identity' , git: ' https://github.com/intridea/omniauth-identity.git'
45
+ gem " omniauth-identity" , git: " https://github.com/intridea/omniauth-identity.git"
46
46
```
47
47
48
48
## Usage
@@ -57,8 +57,8 @@ Rack middleware. In rails, this would be created by an initializer, such as
57
57
``` ruby
58
58
use OmniAuth ::Builder do
59
59
provider :identity , # mandatory: tells OA that the Identity strategy is being used
60
- model: Identity , # optional: specifies the name of the "Identity" model. Defaults to "Identity"
61
- fields: %i[email custom1 custom2] # optional: list of custom fields that are in the model's table
60
+ model: Identity , # optional: specifies the name of the "Identity" model. Defaults to "Identity"
61
+ fields: %i[email custom1 custom2] # optional: list of custom fields that are in the model's table
62
62
end
63
63
```
64
64
@@ -221,8 +221,8 @@ fails. In your OmniAuth configuration, specify any valid rack endpoint in the
221
221
``` ruby
222
222
use OmniAuth ::Builder do
223
223
provider :identity ,
224
- fields: [:email ],
225
- on_failed_registration: UsersController .action(:new )
224
+ fields: [:email ],
225
+ on_failed_registration: UsersController .action(:new )
226
226
end
227
227
```
228
228
@@ -241,7 +241,7 @@ The default value is:
241
241
``` ruby
242
242
use OmniAuth ::Builder do
243
243
provider :identity ,
244
- locate_conditions: -> (req) { { model.auth_key => req.params[' auth_key' ] } }
244
+ locate_conditions: -> (req) { {model.auth_key => req.params[" auth_key" ] } }
245
245
# ...
246
246
end
247
247
```
@@ -270,7 +270,7 @@ option :on_login, nil # See #request_phase
270
270
option :on_validation, nil # See #registration_phase
271
271
option :on_registration, nil # See #registration_phase
272
272
option :on_failed_registration, nil # See #registration_phase
273
- option :locate_conditions, ->(req) { { model.auth_key => req.params[' auth_key'] } }
273
+ option :locate_conditions, ->(req) { {model.auth_key => req.params[" auth_key"] } }
274
274
```
275
275
276
276
Please contribute some documentation if you have the gumption! The maintainer's time is limited, and sometimes the authors of PRs with new options don't update the _ this_ readme. 😭
0 commit comments