Welcome Guest, Not a member yet? Register   Sign In
One-stop Auth package for CodeIgniter 4
#1

(This post was last modified: 09-07-2019, 01:14 AM by ciadmin.)

I want to install packages One-stop Auth package for CodeIgniter 4. But I can’t get it through the command line.

Code:
> composer require myth/auth

[font=arial, sans-serif]gives a message[/font]

Quote:[InvalidArgumentException]                                                                                                               
Could not find package myth/auth at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

[font=arial, sans-serif][font=arial, sans-serif]I installed CI4 from the archive and started the update through the composer, everything was updated successfully and tried to install the package from https://github.com/lonnieezell/myth-auth through the composer[/font][/font]

EDIT: Excessive size reduced for readability
Reply
#2

Just manually install it that's how I got it to work.
What did you Try? What did you Get? What did you Expect?

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

It doesn't have a stable version released yet so you have to tell composer that you will accept beta, alpha, whatever stability in the packages.

Code:
> composer config minimum-stability beta

That should do it from the cli I believe. Or you can add that to composer.json.
Reply
#4

(09-08-2019, 07:30 PM)kilishan Wrote: It doesn't have a stable version released yet so you have to tell composer that you will accept beta, alpha, whatever stability in the packages.

Code:
> composer config minimum-stability beta

That should do it from the cli I believe. Or you can add that to composer.json.

Changing minimim-stability to beta works.

[*]How can add the Myth\Auth namespace to the $psr4 array???

[*]In app/Config/Routes.php there is no variable discoverLocal.
Reply
#5

(This post was last modified: 10-26-2019, 03:59 AM by InsiteFX.)

PHP Code:
// the folder name needs to be Myth\Auth
'Myth\Auth' => ROOTPATH 'Myth\Auth',       // Module Auth 

All of this is in the readme.md

Configuration

Once installed you need to let your CodeIgniter 4 application know where to find the libraries.
In your application, perform the following setup:

1) Edit app/Config/Autoload.php and add the Myth\Auth namespace to the $psr4 array.

2) Edit app/Config/Routes.php and set discoverLocal to true.

3) Edit app/Config/Email.php and verify that a fromName and fromEmail are set as that is used when sending emails for password reset, etc.

4) Edit app/Config/Validation.php and add the following value to the ruleSets array: \Myth\Auth\Authentication\Passwords\ValidationRules::class

5) Ensure your database is setup correctly, then run the Auth migrations:

  php spark migrate:latest -all

As for the root that was for an old version it no longer exists.
What did you Try? What did you Get? What did you Expect?

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

Using 'php spark auth:publish' will probably do the job.
Reply
#7

WHo can tell me, how to install it? I just cant understand
Reply
#8

I cant understand too
Reply




Theme © iAndrew 2016 - Forum software by © MyBB