add notes about passing display/state param during request url call
Mark Dodwell
12 years ago
42 | 42 |
end
|
43 | 43 |
```
|
44 | 44 |
|
45 | |
*NB.* If you want to set the `display` format on a per-request basis, you can just pass it to the OmniAuth request phase URL, for example: `/auth/facebook?display=popup`.
|
|
45 |
*NB.* If you want to set the `display` format on a per-request basis, you can just pass it to the OmniAuth request phase URL, for example: `/auth/facebook?display=popup`. You can also pass through a `state` param which will be passed along to the callback url.
|
46 | 46 |
|
47 | 47 |
## Authentication Hash
|
48 | 48 |
|
84 | 84 |
options.access_token_options.inject({}) { |h,(k,v)| h[k.to_sym] = v; h }
|
85 | 85 |
end
|
86 | 86 |
|
|
87 |
##
|
|
88 |
# You can pass +display+ or +state+ params to the auth request, if
|
|
89 |
# you need to set them dynamically. You can also set these options
|
|
90 |
# in the OmniAuth config :authorize_params option.
|
|
91 |
#
|
|
92 |
# /auth/facebook?display=popup&state=ABC
|
|
93 |
#
|
87 | 94 |
def authorize_params
|
88 | 95 |
super.tap do |params|
|
89 | 96 |
params.merge!(:display => request.params['display']) if request.params['display']
|