Title: Reference implementation of OAuth2 + JWT based authentication system · Issue #52 · anomaly/lab-python-server · GitHub
Open Graph Title: Reference implementation of OAuth2 + JWT based authentication system · Issue #52 · anomaly/lab-python-server
X Title: Reference implementation of OAuth2 + JWT based authentication system · Issue #52 · anomaly/lab-python-server
Description: Is your feature request related to a problem? Please describe. In light of us dropping the use of various third party middleware for authentication see #25, #33, #34 we should provide a reference implementation of an OAuth2 based passwor...
Open Graph Description: Is your feature request related to a problem? Please describe. In light of us dropping the use of various third party middleware for authentication see #25, #33, #34 we should provide a reference i...
X Description: Is your feature request related to a problem? Please describe. In light of us dropping the use of various third party middleware for authentication see #25, #33, #34 we should provide a reference i...
Opengraph URL: https://github.com/anomaly/lab-python-server/issues/52
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reference implementation of OAuth2 + JWT based authentication system","articleBody":"**Is your feature request related to a problem? Please describe.**\r\nIn light of us dropping the use of various third party middleware for authentication see #25, #33, #34 we should provide a reference implementation of an OAuth2 based password authentication system.\r\n\r\nThis will make #31 redundant. \r\n\r\nThe solution will study the \r\n\r\n**Describe the solution you'd like**\r\nStudy the [OAuth2](https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/) reference implementation outlined by the FastAPI docs and implement a set of handlers that adhere to the proposed standards.\r\n\r\nNote that the work being proposed is around authentication and sessions, not sign up and password lifecycle.\r\n\r\nThe implementation ought to provide context around getting the current user, and possibly an alternative around getting an admin user. We should also look at documenting OAuth2 scopes.\r\n\r\nThere are two intents of this implementation:\r\n- For use within production applications built using this template\r\n- As a development alternative when the project aims to use systems like AWS Cognito\r\n\r\nFastAPI uses `python-jose` for the JWT packages, which has not been updated in a while. `pyJWT` on the other hand is receiving updates, so it will be well worth considering using that.\r\n\r\n**Describe alternatives you've considered**\r\nSee the issues and projects like #25, #33, #34 [fastapi-jwt-auth](https://indominusbyte.github.io/fastapi-jwt-auth/usage/refresh/)\r\n\r\n**Additional context**\r\nSecurity researchers like @ScottHelme have been writing about the redundancy of CSRF since 2019:\r\n- [Cross-Site Request Forgery is dead!](https://scotthelme.co.uk/csrf-is-really-dead/)\r\n- [CSRF is (really) dead](https://scotthelme.co.uk/csrf-is-really-dead/)\r\n\r\nother discussion around Starlettel:\r\n- [Why you may not need a CSRF Middleware in 2022](https://github.com/gnat/csrf-starlette-fastapi#why-you-may-not-need-a-csrf-middleware-in-2022)\r\n- [starlette/1411](https://github.com/encode/starlette/discussions/1411)\r\n\r\n> Question to be asked as to why we have not been paying attention to this","author":{"url":"https://github.com/devraj","@type":"Person","name":"devraj"},"datePublished":"2022-11-20T02:06:00Z","url":"https://github.com/anomaly/lab-python-server/issues/52"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cf79a78d-f256-1e11-74ee-1844aebdca59 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B35E:99B56:68CBCB:93940A:6B0479C5 |
| html-safe-nonce | 782d4ff008b94d310940469a60e64c03efb2e7e244d2d73419f70f757fb833fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzVFOjk5QjU2OjY4Q0JDQjo5Mzk0MEE6NkIwNDc5QzUiLCJ2aXNpdG9yX2lkIjoiMzE5NzAyNTMwODc2NzQ1MTU4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f96b68cfe51c4fb237927b98decb614a62854f1b49eec19b78d05177bdb3fd92 |
| hovercard-subject-tag | issue:1456735350 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/anomaly/lab-python-server/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4781dd2917a0e14f2ceecaf74ef601c0a616aabeb3c4f7b142a8997b642e2837/anomaly/lab-python-server/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4781dd2917a0e14f2ceecaf74ef601c0a616aabeb3c4f7b142a8997b642e2837/anomaly/lab-python-server/issues/52 |
| og:image:alt | Is your feature request related to a problem? Please describe. In light of us dropping the use of various third party middleware for authentication see #25, #33, #34 we should provide a reference i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devraj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| turbo-cache-control | no-preview |
| go-import | github.com/anomaly/lab-python-server git https://github.com/anomaly/lab-python-server.git |
| octolytics-dimension-user_id | 3654837 |
| octolytics-dimension-user_login | anomaly |
| octolytics-dimension-repository_id | 491764445 |
| octolytics-dimension-repository_nwo | anomaly/lab-python-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 491764445 |
| octolytics-dimension-repository_network_root_nwo | anomaly/lab-python-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width