Developer login visibility dependent on ENV['SSO_DOMAIN'] existence
unRARed opened this issue · comments
Maybe more of a Gotcha than a Bug. As a Developer, getting the app running with docker and without using the .env
file, I wasn't finding the "Continue as Developer" option from the session form.
The view is checking the presenter for the existence of the SSO_DOMAIN
value in addition to the Rails.env.development?
check here: https://github.com/pupilfirst/pupilfirst/blob/master/app/views/users/sessions/new.html.erb#L15. The developer-specific option seems like it should be outside of the general oauth scope. It also might be more clear if the default value for SSO_DOMAIN was "localhost:5100" which seems to be the out of the box value currently.
Setting the SSO_DOMAIN value displays all the options, including the developer one:
Desktop (please complete the following information):
- OS: macOS 14.0
- Browser Brave
- Version 1.60.118 Chromium: 119.0.6045.163 (Official Build) (arm64)
So aside from the visibility issue, I was having issues with the oauth action, too, but turns out my port problem was due to my bringing over the bin/dev
pattern from Rails 7 (which uses foreman
with Procfile.dev
).
I just needed to tell the Procfile.dev to use port 3000 explicitly and then it aligned with the seeded data:
Procfile.dev:
vite: bin/vite dev
web: bundle exec puma -p 3000 -C config/puma.rb
This is probably because we're using Omniauth's developer strategy to enable the developer bypass. It should be possible to avoid the check for SSO_DOMAIN
just for the developer strategy, though - I'm adding this to our list of bugs.