Well, today is your lucky day!
Learn how to manage user authentication when in a Jira context, when ejected to develop your frontend rapidly and also learn some neat tricks on how to manage session expiry and still redirect to where you need to be.
All this, right here: https://medium.com/@martyhenderson/managing-jira-user-logins-with-a-react-frontend-in-a-jira-dc-plugin-4d87205f2045