oxide-auth icon indicating copy to clipboard operation
oxide-auth copied to clipboard

Improve example documentation

Open HeroicKatora opened this issue 3 years ago • 4 comments

Project Improvement

The lack of comments and the complexity in the setup leads to bad understanding of the examples, especially without prior knowledge of OAuth2's inner workings. In particular:

  • It's unclear which portions of the examples belong to the server and must be provided.
  • Which are purely for the sake of the example client. This being an increased concern for rocket where we must use the same server as the library only allows 'launching one Rocket'.
  • The example structures differ quite a bit. (See also #111)

Comment

Original report (through another channel) also says this:

what was unclear in the examples what are the required parts of example for the server side of the authentication in particular the Client Fairing impl and whats just for the client side in the two files names rocket.rs, something that would be helpful would just adding comments where they are missing in the those two files

Tracking pull request

  • [ ] A pull request does not yet exist

HeroicKatora avatar Oct 14 '20 17:10 HeroicKatora

I second this. I'm using the actix frontend and I found it extremely difficult to figure out OAuth workflow that was implemented in the actix example.

I think much of the ambiguity can be cleared if the OAuth server and the client are launched separately, rather than calling a try_join!. Doing this will separate logs and will help the user better understand the work flow.

realaravinth avatar Jan 12 '21 14:01 realaravinth

Project Improvement

The lack of comments and the complexity in the setup leads to bad understanding of the examples, especially without prior knowledge of OAuth2's inner workings. In particular:

  • It's unclear which portions of the examples belong to the server and must be provided.
  • Which are purely for the sake of the example client. This being an increased concern for rocket where we must use the same server as the library only allows 'launching one Rocket'.
  • The example structures differ quite a bit. (See also Example with iron framework should use generic client #111)

Comment

Original report (through another channel) also says this:

what was unclear in the examples what are the required parts of example for the server side of the authentication in particular the Client Fairing impl and whats just for the client side in the two files names rocket.rs, something that would be helpful would just adding comments where they are missing in the those two files

Tracking pull request

  • [ ] A pull request does not yet exist

Hi thank you for the library!

The best way to go about this in my opinion is just write some sort of noob friendly article that explains how to implement your own front end, obviously with separation of the client and the server, I'm personally rather lost with trying to implement the server on my application, if I could help with testing the article and seeing if everything would work for new people to the language such as me.

Best regards, Luis Bizarro

WildEgo avatar Nov 08 '21 21:11 WildEgo

Hi, i am the person the asked the question on reddit that lead to the creation of this issue, since then Ive switched my project to the Axum framework, which provides an example which is close to what i was looking for https://github.com/tokio-rs/axum/tree/main/examples/jwt, would it be possible to have an example that's just an oxide-auth equivalent to that example and for the client side just some instructions in comments or in a read me to connect via curl

SelectSweet avatar Mar 07 '22 02:03 SelectSweet

Hi, i am the person the asked the question on reddit that lead to the creation of this issue, since then Ive switched my project to the Axum framework, which provides an example which is close to what i was looking for tokio-rs/axum@main/examples/jwt, would it be possible to have an example that's just an oxide-auth equivalent to that example and for the client side just some instructions in comments or in a read me to connect via curl

Just wondering, any progress on it? It might be good if we can have support for axum.

thangchung avatar May 28 '23 14:05 thangchung