Welcome Guest, Not a member yet? Register   Sign In
Announcing Shield: an Official Authentication library
#31

(08-11-2022, 05:10 AM)Mobostar Wrote: I wonder if this means Myth/Auth will be abandoned at some point in the future.

There is no plans to abandon it in the future. 

And you can find a project Notice about it:

Quote:As of June 2022 CodeIgniter now has an official Authentication library, CodeIgniter Shield. If you are looking for an authentication solution for a new project then that is the recommended solution. If you interact with the project repository there may be delays in receiving response. Please direct support questions to GitHub Discussions or to CodeIgniter's Forums or Slack Channel.
Reply
#32

Great addition kilishan. I've been using Myth Auth for years.
Anyway, I'm not sure if this is a bug or this is how you designed it. I added user #1 to superadmin and checked the groups through getGroups()
PHP Code:
auth()->user()->getGroups() 

It returns the correct group

PHP Code:
Array
(
    [0] => superadmin



However, when I checked the permission, 

PHP Code:
auth()->user()->getPermissions() 
it doesn't give me the permissions indicated in the Permissions Matrix in Config/AuthGroups.php

PHP Code:
'superadmin' => [
    'admin.*',
    'users.*',
    'beta.*',
], 

I just want to be able to give the permissions to a group and the members of that group will also get those permissions. I can't find it in the documentation.

Thanks. Anyone can answer.
Reply
#33

Thanks to all CI team members.  

It will be great if it supports google/facebook/twitter login.
Reply
#34

Nice job !
but ... Isn't it amazing that "framework" directory for CI4 core functions is 2,7 M whereas "Shield" directory is 6,9 M !!!!????
Eric
Reply
#35

6.5M is a dictionary.
Reply
#36

It's an auth system with security in mind that allows you to add and build on it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#37

I sent a PR to add JWT Authenticator:
https://github.com/codeigniter4/shield/pull/195

The implementation is done, but there is no documentation yet.

If anyone who has interested in JWT with Shield, please test it.
Reply
#38

@lokman
Here is a package to implement OAuth with shield.
It has provided Google OAuth and Github OAuth by default. I have also explained how to add other services in Yahoo's documentation.
It is easy to use and very easy to extend for other services.
See shield-Oauth if you like.
Reply
#39

Hi! I am relatively new to CI because years before I used the CI2 version earlier. I am trying this Shield and came across a problem for me.
I have public pages should be available without authentication, but I did not find in the docs, where I could set which routes should be available publicly.
Could somebody give me a clue where should I have to set this?
Thanks in advance.
Reply
#40

Hello, @sipiatti

For example, if the blog is public, proceed as follows:

PHP Code:
public $globals = [
    'before' => [
        // ...
        'session' => ['except' => ['login*''register''auth/a/*''blog*']],
    ],
    // ...
]; 

more info see:  https://codeigniter4.github.io/shield/in...-all-pages
and https://codeigniter4.github.io/CodeIgnit...lters.html
Reply




Theme © iAndrew 2016 - Forum software by © MyBB