Skip to content

Instantly share code, notes, and snippets.

@kbjr
Created August 3, 2010 11:01
Show Gist options
  • Save kbjr/506185 to your computer and use it in GitHub Desktop.
Save kbjr/506185 to your computer and use it in GitHub Desktop.
An example of using my OpenID library with CodeIgniter (http://github.com/kbjr/EasyOpenID)
<?php
//...
function try_auth()
{
// load the library
$this->load->library('EasyOpenID');
// start the request
$this->easyopenid
->provider('google')
->return_to('Yours/finish_auth')
->required(array( 'email', 'name' ))
->make_request();
}
function finish_auth()
{
// load the library
$this->load->library('EasyOpenID');
// get the returned user data
$user_data = $this->easyopenid->fetch_result();
// continue processing ...
}
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment