1.17.8 (latest) 1.17.7 1.16.2 1.15.1 1.14.0 1.13.1 1.12.2 Reference documentation and code samples for the googleauth class Google::Auth::WebUserAuthorizer::CallbackApp.

Small Rack app which acts as the default callback handler for the app.

To configure in Rails, add to routes.rb:

    match '/oauth2callback',
          to: Google::Auth::WebUserAuthorizer::CallbackApp,
          via: :all

With Rackup, add to config.ru:

    map '/oauth2callback' do
      run Google::Auth::WebUserAuthorizer::CallbackApp
    end

Or in a classic Sinatra app:

    get('/oauth2callback') do
      Google::Auth::WebUserAuthorizer::CallbackApp.call(env)
    end

## Inherits

- Object

## Methods

### .call

```ruby
def self.call(env) -> Array
```
Handle a rack request. Simply stores the results the authorization
in the session temporarily and redirects back to to the previously
saved redirect URL. Credentials can be later retrieved by calling.
{Google::Auth::Web::WebUserAuthorizer#get_credentials}


<br />

See {Google::Auth::Web::WebUserAuthorizer#get_authorization_uri}
for how to initiate authorization requests.
**Parameter**

- **env** (Hash) --- Rack environment
**Returns**

- (Array) --- HTTP response

### #call

```ruby
def call(env)
```

## Constants

### LOCATION_HEADER

**value:**"Location".freeze

### REDIR_STATUS

**value:**302

### ERROR_STATUS

**value:**500