Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
*Lighthouse ran on https://mobilitydatabase-ptqkqxv2i-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-ptqkqxv2i-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-ptqkqxv2i-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-ptqkqxv2i-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-ptqkqxv2i-mobility-data.vercel.app/gbfs/gbfs-flamingo_porirua * (Desktop)
|
There was a problem hiding this comment.
For internal app communication it's advisable to go with the ServerActions pattern over the API Routes pattern
- less boilerplate code
- more clear description of whats going on
- removed the need for 'session-service.ts'
There was a problem hiding this comment.
For internal app communication it's advisable to go with the ServerActions pattern over the API Routes pattern
- less boilerplate code
- more clear description of whats going on
- removed the need for 'session-service.ts'
I'll follow your advice here.
There was a problem hiding this comment.
After further discussion, by handling the cookie data through Sagas the Server Action pattern is not advisable and we will stick with API Router
There was a problem hiding this comment.
[nit] If I see context folder in a React / NextJs app I'm thinking it's something to do with createContext / useContext which can be misleading
There was a problem hiding this comment.
Thoughts on merging the Cypress + Mock data fixtures?
There was a problem hiding this comment.
Thoughts on merging the Cypress + Mock data fixtures?
Good idea, I think we can leave it outside this PR, which is already large.
|
I know it's not the main scope for this PR, I tried running the mocked app |
It was working at some point... I might have broken it after subsequent code changes. |
Summary:
Part of MobilityData/mobility-feed-api#1578
This PR adds an authentication mechanism to enable API calls from the UI server components. Here are the major changes:
Expected behavior:
Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).
From our AI friend
This pull request introduces new documentation and utility scripts to support authentication workflows for server-side rendering (SSR) and Google Cloud IAP (Identity-Aware Proxy) with Identity Platform (GCIP). It also adds mock fixture data and improves developer tooling for testing IAP-protected APIs. The main themes are authentication architecture documentation, IAP/GCIP test scripts, and fixture data for local development.
Authentication Architecture & Documentation
docs/Authentication.mdexplaining SSR authentication, session cookies, GCIP ID token flows, server-side token management, environment variables, mock mode (MSW), and security considerations. This document serves as a reference for both implementation and troubleshooting.Fixture Data for Local Development
feed_datasets_mdb-2947.json,feed_mdb-2947.json,gtfs_feed_mdb-2947.json) containing mock feed and dataset objects to support local development and testing of feed-related features. [1] [2] [3]Testing tips:
Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.
Please make sure these boxes are checked before submitting your pull request - thanks!
yarn testto make sure you didn't break anything