AscendingCreations / AxumSessionAuth

Library to Provide a User Authentication and privilege Token Checks.
MIT License
99 stars 11 forks source link

Example code greet handler uses current_user variable which is not defined at that point #17

Closed taladar closed 1 year ago

taladar commented 1 year ago

Maybe that was supposed to be auth.current_user ? There is also a section inside that if where auth.current_user is retrieved again though.

The greet handler in general is hard to follow.

genusistimelord commented 1 year ago

Thank you for catching that . I will update it soon. Also the reason its complex is its showing a few different ways to use Auth which includes Rights Management. probably can make it more clear with some comments.

taladar commented 1 year ago

Maybe it would make sense to have one handler per feature you want to demonstrate to delineate better where one example usage ends and the next one starts?

Thanks for your quick response.

genusistimelord commented 1 year ago

let me know if the new readme greet is a better example for you as well.

taladar commented 1 year ago

The comments certainly help me understand what is going on. Thanks.