9

I am looking to create an API using CodeIgniter and oAuth. I found what looks like a great extension to CI here:

https://github.com/alexbilbie/CodeIgniter-OAuth-2.0-Server

I looks promising but I have no clue how to implement it. There is no instructions anywhere.

Any input is welcome!

2
  • Have you tried asking the author of this project? Commented Aug 30, 2011 at 18:14
  • Just wondering if anyone could send their implementation of this library as I am totally new to CodeIgniter and in desperate need to have OAuth 2.0 for my PHP App. Commented Nov 10, 2011 at 20:39

2 Answers 2

3

I am not familiar with this library myself, but just had a look and it looks like you just want to download the library and copy all of the folders in the downloadable zip into your Codeigniter application directory. If you look in the controllers folder of the downloaded zip file, you'll see 2 controllers which show how the library is being used.

The two files are oauth.php and signin.php. They appear to show how you can login in a user via oAuth. Just carefully go through the files and you'll work it out.

Sign up to request clarification or add additional context in comments.

1 Comment

Mm, I have now dropped the files in the correct locations and I am trying to open the URL: localhost:8888/testcenter/codeigniter/index.php/oauth/sign_in but it is not working. Just a while page.
2

I tried this extension a few days ago and i got i working. You need the edit the config-files, config/oauth_client.php, config/oauth_resource_server.php and maybe config/rest.php.

You also need the add at least one application to the database. One row in the applications-table is enough. Use the same client_id and client_secret as you used in the client config-file and it should work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.