Closed grayside closed 2 years ago
After completing that analysis and starting to pursue the work, I found the amount of complexity in the implementation, the products, and the documentation seems untenable. Team is going to have some discussions on whether we're going to stick with Identity Platform, and try putting together a comprehensive approach for next steps.
This was fixed by switching to Google Identity/Google Sign-in. See #210, #212.
This issue is non-standard, representing a meta bug of observed problems and churn related to user authentication in the website. In order to meet scheduled duedates, I'm going to see if I can help fix it.
Special Challenges
We are trying to use Cloud Identity Platform to tell a story of how customers can have broad SSO capability in their apps.
However, most of the technical information we need is in the Firebase Authentication documentation, using the Firebase Authentication library, and we are building a "backend website", which we perceive as being a secondary use case for the Firebase documentation. This has made it difficult to get a comprehensive understanding of what needs to happen.
Observed Problems
Gap Analysis
User Authentication Middleware
https://github.com/GoogleCloudPlatform/emblem/blob/b6db1a4c9a13609d14a7e2f97702a36d1985189b/website/middleware/auth.py#L23-L29
User Login Flow
https://github.com/GoogleCloudPlatform/emblem/blob/b6db1a4c9a13609d14a7e2f97702a36d1985189b/website/static/login.js#L35-L43
Login User Interface
https://github.com/GoogleCloudPlatform/emblem/blob/b6db1a4c9a13609d14a7e2f97702a36d1985189b/website/templates/base.html#L67-L81
Troubleshooting
Sequences
Unauthenticated, Home Page, API Success
Unauthenticated, Home Page, API 5xx error
Future Note: We should enhance error handling to insert default text when it's a 5xx failure on read-only operations.
Authenticated, Home Page, Day 0, API Success
Authenticated, Home Page, Day 20
Invalid Auth, Home Page
Tasks
Future Tasks
140: Design an approach for CSRF, perhaps based on Manage Cookies and Firebase Auth Node.js Quickstart (Python code does not demonstrate CSRF protection)
153: API can validate origin authority of API requests.