CodeIgniter Forums
Concept of OAuth login - Step after the access token - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Concept of OAuth login - Step after the access token (/showthread.php?tid=70745)



Concept of OAuth login - Step after the access token - Coool6 - 05-24-2018

Hello Lovely CI Community,

I studied how OAuth (Facebook/google login) works in order to implement it in my project but i don't really get how it can exist beside classic method for a membership area.

Imagine this forum for example, you create an account with a classic register form, the system will create an entry for you in the DB with your login/password.
The entry can contain all your preferences and be linked to other datas. It will check the login/password each time you want to connect.

But in the case of OAuth, how it works ? Because the user didn't create any account and you just received an access token...
How can you deal with it in order to "get him into the boxes" ? In order for the OAuth path to join the classic one at a moment during the process ?

Not sure if my post is very clear... It's the step after the system received the access token which is blur in my mind. 

Thanks a lot for your help !


RE: Concept of OAuth login - Step after the access token - arma7x - 05-24-2018

https://aaronparecki.com/oauth-2-simplified/


RE: Concept of OAuth login - Step after the access token - Coool6 - 05-25-2018

(05-24-2018, 03:42 PM)arma7x Wrote: https://aaronparecki.com/oauth-2-simplified/

Thanks a lot for the link but it's not really the issue to me. 
As i said, it's the part after the access token which is an issue to me. 

To unify it with a classic user system. If you have any ideas/advices.


RE: Concept of OAuth login - Step after the access token - qury - 05-25-2018

You can use hooks and Ion Auth plus your auth token authentication.

I have a similar implementation for adldap2 for authenticating against Active Directory.

Basically once you get the OAUTH token you use that as a trigger to log in the user this way you can store any information you want in your local database.