Skip to content

Conversation

chiku-samugari
Copy link

Purpose

Companion to osf.io PR #11224.
Enables osf.io (localhost:5000) to act as a reverse proxy for the angular-osf dev server (localhost:4300) during local development.

Key points

1 . baseHref

Resource URLs need to start with /angular_osf to be properly proxied. baseHref is set to /angular_osf/assets/, ensuring that URLs such as /@vite/client resolve correctly.

2 . Cookie authentication

Although a dedicated login UI is not included, the app now reads the standard auth cookies. If the user is already authenticated, their username appears in the top-right corner. One possible verification flow is as follows:

  1. Run osf.io with PRIMARY_WEB_APP="ember_osf_web" (osf.io/website/settings/local.py).
  2. Browse to http://localhost:5000 and sign in via ember-osf-web.
  3. Switch PRIMARY_WEB_APP to "angular_osf" and restart the web service.
  4. Reload http://localhost:5000; angular-osf loads and displays the logged-in user.
@chiku-samugari
Copy link
Author

I found that the Cookie Authentication feature proposed in this draft PR has been implemented, in a better approach than mine. I close this PR for that reason.
Many thanks to everyone who took the time to review and consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant