Add welcome mat with homepage redirects
NEXT_PUBLIC_BLOG_FEED_URL=https://cloud.gov/updates.xml
Changes proposed in this pull request:
- Redirects users to
/loginwhen navigating to root/and not authenticated - When authenticated and navigating to root, redirect users to one of their orgs:
/orgs/:org_id- When
lastViewedOrgIdis set, take them to this org - If not, then make a CAPI request to get their first org and take them there
- When
- Implements welcome mat design for
/orgs/:org_idas specified in #529 (closed) - Pulls in real blog data from
https://cloud.gov/updates.xml
How to test
- add
NEXT_PUBLIC_BLOG_FEED_URL=https://cloud.gov/updates.xmlto.env.local - Spin up a
uaa-dockercontainer (instructions) - Log into the CF CLI
- Run the dev server
npm run dev-cf - Try to access
/- you should be redirected to UAA login - Use the credentials found in
/uaa-docker/uaa.ymlto log in - After log in, you should be redirected to
/orgs/:org_id
Related issues
Closes #529 (closed)
Submitter checklist
-
Added logging is not capturing sensitive data and is set to an appropriate level (DEBUG vs INFO etc) -
Updated relevant documentation (README, ADRs, explainers, diagrams)
Security considerations
Uses org id stored in cookie to make CF API requests in order to show the content on the page