Streamlining Flickr authentication
From PeopleAggregator
By default, PeopleAggregator uses Flickr's desktop authentication method, because the much nicer web authentication method locks API keys to individual sites, so doesn't work for a distributed application without a fixed URL.
The result of this is that users have to go through this process when logging in via Flickr:
- User clicks a link on the login page to open Flickr in a popup window
- User logs in to Flickr in the popup
- User closes the popup
- User clicks a link on the login page and is logged in
However, you can configure your system to use the web authentication method, which will give you a login process like this:
- User clicks a link on the login page to go to Flickr
- User logs in to Flickr
- Flickr sends the user back to PeopleAggregator and the user is logged in
To do this:
- Sign up for an API key at Flickr
- Configure your API key to have a return URL of http://(your-peopleaggregator-url)/login.php?auth=flickr&finished (e.g. for peopleaggregator.net, the URL is http://www.peopleaggregator.net/login.php?auth=flickr&finished)
- Edit your local_config.php and add the following lines (replacing YOUR API KEY and YOUR API SECRET with the API key and secret from Flickr):
$flickr_api_key = 'YOUR API KEY'; $flickr_api_secret = 'YOUR API SECRET'; $flickr_auth_type = 'web';
- Now try it out:
- Now click 'login via flickr' in the login page or popup
- Click on the 'click here to log in via flickr' link
- Log in to Flickr
- Accept the authorization request
- Verify that you are sent back to your PeopleAggregator
