oauth2-server icon indicating copy to clipboard operation
oauth2-server copied to clipboard

Update Documentation and Add Quickstart

Open bretterer opened this issue 8 years ago • 7 comments

We should look at updating the documentation and getting a little more in-depth quickstart of how to get up and running with this.

When doing this, do not focus on a framework, but rather vanilla PHP and using oauth2-server for the authentication. Not sure what this should look like at the moment, but wanted to start a discussion on pain points of the current docs and what we can do better.

bretterer avatar Oct 26 '17 18:10 bretterer

Ill start off the comments....

I have yet been successful of getting the server running for a vanilla PHP install. Always use it through Laravel..... I tried a little while ago, and found it very confusing and incomplete.

A full "zero to hero" should be built as a sample repo or something to help get people started with this.

bretterer avatar Oct 26 '17 18:10 bretterer

#794 Looks like we need to add what a base set of tables looks like, possibly look into having either a "migrations" package for this, or just leave it to the samples.

bretterer avatar Oct 26 '17 19:10 bretterer

I totally agree that we need to improve the documentation. It's quite an undertaking, but I'd like to give it a go.

A library/package is likely to be overly prescriptive for some, making it kind of useless, whilst also being seen as an 'official' starting point by others, thus running the risk of being overly simplistic and causing more trouble - we wouldn't want production code running off a 'thrown together' demo implementation, but I fear that would happen all too quickly.

We have to remember that the main point of this library is to be agnostic to the implementation details, so we should be encouraging implementors to think in this way so that they can create the right implementation for their context and requirements.

simonhamp avatar Mar 22 '18 12:03 simonhamp

@simonhamp Any progress on the documentation? Would love to see this project get proper documentation.

I'm ~70% of the way through integrating this into a vanilla PHP project, and it's been quite the undertaking. The documentation feels like it's written as a loose reference for those that made it, not for anyone new. The interfaces, especially, I find I'm just having to search through the lib code to see how methods are used to make sure I utilize them properly. Also things like the fact that the lib generates the Access Token identifier, but not the client identifier/secret. It's unclear as to which side is doing what.

I feel like what really needs to be communicated in this docs is:

  • What's included in the lib (interfaces, traits, etc.)
  • What the lib is doing, in some detail, for each section (client, access token, etc.)
  • What's expected of the implementor (e.g., OAuth2 Server generates the tokens, you generate the client id and secret)
  • Tentative data structures for common use cases (i.e. MySQL)

Thank you for your willingness to give it a shot! The PHP League generates great libraries, I just wish they were as well documented as they are built. ;)

JasonTheAdams avatar Aug 21 '18 17:08 JasonTheAdams

@bretterer @simonhamp @JasonTheAdams

Hello there I was wondering if anyone has finally been able to integrate this in a vanilla PHP project?

Any responses is highly appreciated as I'm considering this.

(I'm running Laravel behind, but I'm not a big fan of framework dependent libraries and prefer to use the vanilla way as it's usually more transparent, clean, and easy to switch out to another library if in the future there is a need to)

bs-thomas avatar Jul 13 '19 04:07 bs-thomas

@bs-thomas the library is framework agnostic. It can be integrated with any framework or used with a vanilla PHP installation.

Sephster avatar Jul 13 '19 10:07 Sephster

Thank you very much for your message.

Yes while I do know that it Can be used with vanilla PHP, based on the upper comments it seems like the documentation was not very clear on how it is to be used on vanilla PHP.

So I was just wondering if the documentation has been improved on this aspect. The time I read the documentation, It was based on slim framework I think.

And I was just seeing if anybody in this thread has successfully been able to integrate this with vanilla PHP, as they seem to be facing some issues previously.

Thank you

bs-thomas avatar Jul 13 '19 11:07 bs-thomas