Welcome Guest, Not a member yet? Register   Sign In
Pure security CodeIgniter 4 auth system sample script.
#1
Star 

I m asking if we could get a sample CodeIgniter 4 project along with it containing the sample script for auth system (login-remember me-register) without using One-stop Auth package or any package , then it will be  great. thanks.
I looked at all github repositories and did not find.
Reply
#2

What you want probably doesn't exist yet. There are a couple repos that you should know about.

Myth-Auth
Written by the guy who has done most of the coding behind CI v4. It is not yet completely ready, but it might be by the time CI v4 releases, or shortly thereafter. It was designed with strong security in mind.

Ion_auth for CI4
ion_auth hasn't been updated in many months and CI v4 is currently changing every day. So, it would probably be frustrating trying to use it. But there is bound to be a lot to learn by studying the code. All the ideas you're looking for are there.
Reply
#3

I second Myth:Auth, it's fully usable (with the caveat that it isn't "production-ready") and built from the ground up for CI4. it's also a great place to get familiar with module writing for CI4, especially since it is by CodeIgniter's own Lonnie. Smile

Most of my client projects implementing it are not open sourced but if you want an example of it integrated check out this repo (abandoned, but only a couple weeks ago):

https://github.com/tattersoftware/sefer

A few things to pay attention to...

* The module installed from develop branch via Composer: https://github.com/tattersoftware/sefer/...poser.json

* Config file that extends the module version, overwriting values I want changed: https://github.com/tattersoftware/sefer/...g/Auth.php

* The login filter used globally to require all traffic to be authenticated (probably won't usually want to do it this way): https://github.com/tattersoftware/sefer/...ilters.php

* A view layout (set by config/Auth.php) so the Auth views match the UI of the rest of the site: https://github.com/tattersoftware/sefer/...ws/layouts
Reply
#4

(11-01-2019, 06:25 AM)MGatner Wrote: Most of my client projects implementing it are not open sourced but if you want an example of it integrated check out this repo (abandoned, but only a couple weeks ago):

https://github.com/tattersoftware/sefer

I'm pretty new to frameworks but have been asked to find a login / auth system for a CI  project I'm helping with. I have been through the CI tutorial on the official site but maybe need to re-visit it. 

I've followed the GitHub README to install & configure Myth:Auth but really don't understand how to use it. I'm not sure if it would be useful (or very easy!)  for me to download & try & get your example working on my machine or if your intention was for people to just look at your code on GitHib?

I've looked at various other Getting Started  forum posts including this one but afraid the answer isn't detailed enough for me. What are login & register & how are they called? Anyway, I'll reply to that post directly.

Grateful for any more help / advice / examples you can provide - thanks!
Reply
#5

(This post was last modified: 08-09-2020, 10:47 AM by jim1001.)

I can see the login & register screens now - I had to change the routing (app/Config/Routes.php) which was why they weren't showing...
Reply
#6

@jim1001 Glad you got it working! I wouldn’t recommend that people look at that project anymore, it is very dated. I will make an example Myth:Auth integration for the CodeIgniter Playground for people who want to see a working example of integrating it into your project.
Reply
#7

(08-10-2020, 06:28 AM)MGatner Wrote: @jim1001 Glad you got it working! I wouldn’t recommend that people look at that project anymore, it is very dated. I will make an example Myth:Auth integration for the CodeIgniter Playground for people who want to see a working example of integrating it into your project.


Thanks! Look forward to your example in the playground. It may be too late for me as the project I need it for isn't going to be funded beyond end August  Sad & it may be a while before I use CodeIgniter again. However I'm sure it will be useful to many others - thanks for your time & effort.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB