Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For a new CI4 project #2

Closed
salain opened this issue Jan 11, 2021 · 7 comments
Closed

For a new CI4 project #2

salain opened this issue Jan 11, 2021 · 7 comments

Comments

@salain
Copy link

salain commented Jan 11, 2021

Hi Lonnie,
Is this repo a replacement for Myth-auth?
I am starting a new CI4 project, can this package be use instead of myth-auth.

Thank you

@lonnieezell
Copy link
Member

It is not anywhere close to complete. But feel free to keep an eye on it :)

@nowackipawel
Copy link
Contributor

Hi @lonnieezell ;-) how are you?
Could you please let us about an update? Is it in your opinion ready to use on production? ;-)

@lonnieezell
Copy link
Member

I'm using it as I'm building out Bonfire and I think it's 99% there for production. There's one issue a user has reported with the "actions" (after login/registration optionals like 2FA and email verification. Those currently rely on it being in the session which probably not the right way to go with that. Other than that I would call the code production ready.

Mostly what I have left on it is documention and see if I can make the onboarding process smoother with it.

@nowackipawel
Copy link
Contributor

nowackipawel commented Apr 4, 2022

Thank you. It looks like gr8 piece of code.
I will look at those things you mentioned - maybe I will have some ideas for it.

@nowackipawel
Copy link
Contributor

nowackipawel commented Apr 6, 2022

May you guys share Events config somehow?
didLogin, didRegister, etc. ;-), there are calls to it but I cannot find them configured anywhere ;-)
I guess example of Filter config could be helpful too ;>

@lonnieezell
Copy link
Member

There's no configuration needed if you don't need to use it. If you do, just add it to your Events config file as described in the user guide. Something like:

Events::on('didLogin', function (...$params)
{
    // do stuff here
});

@nowackipawel
Copy link
Contributor

nowackipawel commented Apr 6, 2022

There's no configuration needed if you don't need to use it.

Ohh, that's ok. I was not sure if those events should fire something by default or not.

About:

Those currently rely on it being in the session which probably not the right way

What do you think about idea to simplify code in Register/LoginController:

It is:

$actionClass = setting('Auth.actions')['register'] ?? null;

        if (! empty($actionClass)) {
            session()->set('auth_action', $actionClass);

            return redirect()->to('auth/a/show');
        }

it could be:

        if (setting('Auth.actions')['register'] ?? null) {
            return redirect()->to('auth/a/show');
        }

and check class that should support it directly in ActionController?

BTW/ I would name those routes as you did with "verify-magc-link";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants