Welcome Guest, Not a member yet? Register   Sign In
Community Auth for mobile login
#1

I've been using Community Auth for CodeIgniter 2.2.0 for many years to manage users in my CI website. 

I now have a mobile app, and I've been trying to use Community Auth to manage user registration, login and access to website content.

To begin I cloned the user.php controller (renamed to mobile.php) and send a username and password to a modified version of the login function:


Code:
if( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )
{
$this->require_min_level(1);
}

 The problems I've encountered seem to come from two sources:
1) UI rerouting to a login page. Since there are no html pages for a mobile device I can't seem to figure out a way to override this and replace webpage output with a json encoded message. (i.e. define('LOGIN_PAGE', 'login')Wink
2) form_token. It seems Community Auth is looking for a form_token, however I have no idea where this is coming from or how to use it. 


It may not be possible to have mobile access co-exist with my traditional html form based login, so I've been thinking I might have to clone MY_Controller & Authentication.php to meet my needs. But before doing this I thought I'd see if there is an alternate approach, or find out if it can even be done.

BTW: I was able to create a mobile login a few years ago using DX Auth.
Thanks
Reply


Messages In This Thread
Community Auth for mobile login - by escaperadius - 01-23-2016, 09:56 AM
RE: Community Auth for mobile login - by skunkbad - 01-23-2016, 12:08 PM
RE: Community Auth for mobile login - by skunkbad - 01-23-2016, 06:44 PM
RE: Community Auth for mobile login - by skunkbad - 01-23-2016, 09:45 PM
RE: Community Auth for mobile login - by skunkbad - 01-24-2016, 10:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB