Login (and register) with Facebook and Ion Auth

A lot of people asked (including a very generous donor called Federico), so why not try to do it?

I must start by telling you that this may not be the best way of doing it but it is a basic one…

So let’s start. In order to start doing our Facebook login we first need to take a look at the documentation from Facebook (https://developers.facebook.com/docs/facebook-login). This documentation says that in order to login with Facebook we first need to set up an “app” with an ID and a secret key (https://developers.facebook.com/docs/facebook-login/web). We do this by going to our App Dashboard (https://developers.facebook.com/apps/). In there we can create a “Demo” app, which is good for our testing needs. Continue reading

Alter the way Ion Auth works by using hooks. Get a gravatar after the user logs in

Ion Auth library has something called hooks. These hooks are just what they’re called… Hooks. In there you can attach any code you want by simply writing the appropriate functions. These hooks are triggered inside the library or model at specific moments within the workflow. Continue reading

Register users using Ion Auth in CodeIgniter 3

What we will learn in this episode

OK… We’ve installed Ion Auth and made the login page. How about allowing users to register an account? In this tutorial we will find out how we can use Ion Auth in order to allow users to register for an account. After this we will see how to change the controller so that only administrators can register new users. Continue reading