Login with react app doesn't persist the session in flask_login. So, we can return a auth token to the user on login. Which can be used in the Authorization header for accessing protected routes.
Fixes #84
Type of change
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
Try using a protected route without login, using the auth token in header.
Test Configuration:
Chrome
Postman
Windows 10
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
Description
Login with react app doesn't persist the session in flask_login. So, we can return a auth token to the user on login. Which can be used in the Authorization header for accessing protected routes.
Fixes #84
Type of change
How Has This Been Tested?
Try using a protected route without login, using the auth token in header.
Test Configuration:
Checklist: