I was in your shoes, a while back, until I found this comprehensive tutorial on approaching Authorization:
There’s no shortcut, no library can save you.
Just learn from the above tutorial, and then take it further as per your requirements.
I put some of my thoughts on this, in another thread:
3 Likes