Welcome Guest, Not a member yet? Register   Sign In
CI4 as backend for React.js and authentication
#11

(01-29-2022, 04:08 AM)dgvirtual Wrote: I am trying to learn React framework using Codeigniter as backend. Therefore I am trying to use Codeigniter as RESTful API source. But I also need authentication and user management for the project, as most functionality should only be accessible to logged-in users.
And I am stuck, since I cannot find any reasonably easy to use authentication library for my purposes. You know, something like ion_auth, but with API that would be pluggable to React frontend. Something with tokens instead of cookies perhaps...
I realize there is a lot to learn for me on this way, but any guidance or suggestions would be really appreciated.

Hi,

My suggestion is using JWT with Codeigniter4  as backend for React and use Axios. I have done this with Vuejs. There is full tutorial on how to setup JWT with CI4 in Udemy by Online Web Tutor. Fantastic. I have a developed a headless CMS using CI4 as an API Server for all our Apps. This includes JWT Authentication. Try it and you will find it very easy.
Reply
#12

Hi murugappan

Thanks for your valuable inputs. Do you have any sample project for JWT with CI4 and ReactJS to check out.

Regards
Reply
#13

(05-13-2022, 03:57 PM)murugappan Wrote:
(01-29-2022, 04:08 AM)dgvirtual Wrote: I am trying to learn React framework using Codeigniter as backend. Therefore I am trying to use Codeigniter as RESTful API source. But I also need authentication and user management for the project, as most functionality should only be accessible to logged-in users.
And I am stuck, since I cannot find any reasonably easy to use authentication library for my purposes. You know, something like ion_auth, but with API that would be pluggable to React frontend. Something with tokens instead of cookies perhaps...
I realize there is a lot to learn for me on this way, but any guidance or suggestions would be really appreciated.

Hi,

My suggestion is using JWT with Codeigniter4  as backend for React and use Axios. I have done this with Vuejs. There is full tutorial on how to setup JWT with CI4 in Udemy by Online Web Tutor. Fantastic. I have a developed a headless CMS using CI4 as an API Server for all our Apps. This includes JWT Authentication. Try it and you will find it very easy.
Which tutorial is it, exactly, on Udemy? Cannot find it...
==

Donatas G.
Reply
#14

(05-15-2022, 01:31 PM)dgvirtual Wrote: Which tutorial is it, exactly, on Udemy? Cannot find it...
Hi. Try this tutorial: CodeIgniter 4 JWT auth
Reply




Theme © iAndrew 2016 - Forum software by © MyBB