lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
637 stars 208 forks source link

Why use Myth-Auth and not Shield? #527

Closed sba closed 2 years ago

sba commented 2 years ago

What is the difference between the two packages? Why and when should I use Myth-Auth and not the official Shield package? When is one to be used in favour of the other?

MGatner commented 2 years ago

If you are starting fresh I would definitely recommend using Shield. Myth:Auth was a very early CI4 package and a lot of what was learned during that development went into making Shield. At this point I don't think there is any advantage to Myth: it is less maintained, has fewer features, and has a few outstanding issues that would require a major version change so haven't been addressed.

manageruz commented 2 years ago

@kilishan - the author of both packages wrote:

This was an evolution of Myth:Auth, using many similar concepts, but designed to be as flexible as possible, be usable in more situations, and follow even more recent best practices in authentication design.

manageruz commented 2 years ago

When is one to be used in favour of the other?

Shield has a token authentication, so if you need api access in your app you should use shield package. Myth auth for now don't have token auth functionality.