tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.32k stars 1.54k forks source link

Documentation needs update #1638

Open gileneusz opened 6 years ago

gileneusz commented 6 years ago

Subject of the issue

The main issue od tymondesigns/jwt-aut is lack of documentation. You cannot install JWT without running into many issues and hours spend on searching for solutions.

Please provide updated documentation for the users with examples and good practices.

Your environment

Q A
Bug? no
New Feature? yes - documentation
Framework Laravel
Framework version 5.x
Package version 1.x, 2.x
PHP version 5.x.y / 7.x.y

Steps to reproduce

Follow current documentation and install JWT

Expected behaviour

JWT should work

Actual behaviour

JWT is not working, you've got a lot of errors, you are searching google, git, stackoverflow, you are asking questions and opening new issues on tymondesigns

warlord0 commented 6 years ago

And what you do find can be confusing. Is it talking about 0.5 or 1.0?

I'm 2 days in and finally have it working with 1.0. I have to say that it is worth the effort, just a steep learning curve when you have never used jwt and not sure of the principles involved.

genyded commented 6 years ago

Also keep in mind this is ALL pre 1.0.0, so some rapid changes are expected. Some of that change has been driven by feedback from JWT experts trying to use this in real world applications which should only make it better for us all in the long run. I also have a feeling they recently added a team member who knows this stuff really well which is why things have really been changing (for the better) lately .

Give it a bit more time and it will solidify and likely more than meet our needs. Or use something like Laravel Passport and have 8 "auth" tables added to your database, a config nightmare, no control over your JWT algorithm, no claims control (at least not as easily as specifying an array), and a plethora of other issues already addressed here.

gileneusz commented 6 years ago

I'm not telling tymondesigns jwt-auth is bad. I think this is clear and better than passport for the reasons you pointed out. I'm just asking for documentation that will be constantly updated. Since I first started working with jwt on beginning of this year, I can't see any changes on this field...

Reached commented 6 years ago

Currently, I see the following problems with the documentation:

  1. Following the docs for the v1 version on a brand new Laravel 5.6 installation will NOT work without some extra steps as there are some errors with the implementation, e.g. https://github.com/tymondesigns/jwt-auth/issues/1367
  2. Versioning of the library/what is referred to is two different things. In the 1.0 docs, when you install through composer, you will actually get the 0.5 version of the library (this will confuse many users). When you then try to follow the guide, you will end up with all sorts of errors (naturally).

My suggestions are to either remove the references to beta/dev versions or to update the documentation so that it's more clear how to get started.

I would like to help if you accept PR's.

Also great job on the library! 💯