Update README
This commit is contained in:
parent
1076a1c18d
commit
c21edf46ee
26
README.md
26
README.md
|
@ -122,6 +122,32 @@ environment information on the callback request. It is entirely up to
|
||||||
you how you want to implement the particulars of your application's
|
you how you want to implement the particulars of your application's
|
||||||
authentication flow.
|
authentication flow.
|
||||||
|
|
||||||
|
## Configuring The `origin` Param
|
||||||
|
The `origin` url parameter is typically used to inform where a user came from and where, should you choose to use it, they'd want to return to.
|
||||||
|
|
||||||
|
There are three possible options:
|
||||||
|
|
||||||
|
Default Flow:
|
||||||
|
```ruby
|
||||||
|
# /auth/twitter/?origin=[URL]
|
||||||
|
# No change
|
||||||
|
# If blank, `omniauth.origin` is set to HTTP_REFERER
|
||||||
|
```
|
||||||
|
|
||||||
|
Renaming Origin Param:
|
||||||
|
```ruby
|
||||||
|
# /auth/twitter/?return_to=[URL]
|
||||||
|
# If blank, `omniauth.origin` is set to HTTP_REFERER
|
||||||
|
provider :twitter, ENV['KEY'], ENV['SECRET'], origin_param: 'return_to'
|
||||||
|
```
|
||||||
|
|
||||||
|
Disabling Origin Param:
|
||||||
|
```ruby
|
||||||
|
# /auth/twitter
|
||||||
|
# Origin handled externally, if need be. `omniauth.origin` is not set
|
||||||
|
provider :twitter, ENV['KEY'], ENV['SECRET'], origin_param: false
|
||||||
|
```
|
||||||
|
|
||||||
## Integrating OmniAuth Into Your Rails API
|
## Integrating OmniAuth Into Your Rails API
|
||||||
The following middleware are (by default) included for session management in
|
The following middleware are (by default) included for session management in
|
||||||
Rails applications. When using OmniAuth with a Rails API, you'll need to add
|
Rails applications. When using OmniAuth with a Rails API, you'll need to add
|
||||||
|
|
Loading…
Reference in New Issue