google/oauth2client — pull request #48 by bitle (2014-08-31 21:55:36+00:00)
Title: Use redirect_uri from client_secrets.json

Clientsecrets file downloaded from Google APIs project already contains redirect_uri and one doesn't need to provide it separately.

This PR keeps old functionality, when `redirect_uri` can be provided as an argument to `flow_from_clientsecrets`.

Given client_secrets.json that contains redirect uri:
```
# client_secrets.json
{
"web":
{
"client_id":"blah-blah",
"client_secret":"blah-blah",
"client_email":"blah-blah",
"redirect_uris":["https://example.com/oauth2callback"],
}
}
```
The following two lines of code have the same behavior:
```
redirect_uri = 'https://example.com/oauth2callback
# old way:
flow = flow_from_clientsecrets('client_secrets.json', scopes, redirect_uri=redirect_uri)
# new way:
flow = flow_from_clientsecrets('client_secrets.json', scopes)
```