Best way to perform authentication?
I just started my first mobile project in React Native, having previously worked mostly on the web. In one of my web projects I implemented a simple authentication flow - username with password that would be validated (first on the frontend and then more thoroughly on the backend), then the password would get hashed, and then a JWT access token would be returned to the client and get stored in a HttpOnly cookie. I later learned that it is better to not implement custom authentication as I did, but to use instead a well established library.
Therefore, I wanted to ask what do you guys recommend? What are you using for authentication in a mobile application?
Thank you very much in advance!