Multiple login redirect urls - #1368
Open
eilmiv wants to merge 6 commits into
Open
Conversation
…t are not a subdomain of the default space
Contributor
There was a problem hiding this comment.
Pull request overview
Adds domain-aware redirect URI selection for OIDC and ORCID authentication across TeSS spaces.
Changes:
- Supports multiple provider redirect URIs using public-suffix domain matching.
- Filters unsupported login providers by space.
- Updates authentication configuration and tests.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Gemfile |
Adds public_suffix. |
Gemfile.lock |
Locks the dependency. |
config/secrets.github.yml |
Documents redirect URI lists. |
config/secrets.example.yml |
Documents redirect URI lists. |
config/initializers/omniauth.rb |
Implements domain-aware URI resolution. |
config/initializers/omniauth/oidc.rb |
Enables multiple OIDC redirects. |
config/initializers/omniauth/oidc2.rb |
Enables multiple secondary OIDC redirects. |
config/initializers/omniauth/ls_login.rb |
Enables multiple LS Login redirects. |
app/models/space.rb |
Replaces prefix-based domain validation. |
app/helpers/spaces_helper.rb |
Filters providers by space domain. |
app/helpers/application_helper.rb |
Generalizes provider login links. |
app/controllers/orcid_controller.rb |
Selects an ORCID redirect URI. |
app/controllers/concerns/space_redirect.rb |
Uses registrable-domain matching. |
app/views/users/show.html.erb |
Applies ORCID-specific availability checks. |
app/views/layouts/_login_menu.html.erb |
Shows only supported providers. |
app/views/devise/sessions/new.html.erb |
Hides unsupported provider options. |
app/views/devise/sessions/_omniauth_options.html.erb |
Uses filtered provider links. |
test/models/space_test.rb |
Tests registrable-domain matching. |
test/integration/login_test.rb |
Tests provider visibility by host. |
test/controllers/static_controller_test.rb |
Updates login-menu configuration tests. |
test/controllers/orcid_controller_test.rb |
Tests ORCID redirect selection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
Author
|
Of course, it is not so easy to test this login change because it depends on interaction with login providers. I can confirm that login worked in PaN-Training before the fixes that ware done as a result of review in this pull request. |
eilmiv
marked this pull request as ready for review
August 18, 2026 14:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Motivation and context
Screenshots
There are no UI changes other than only showing valid login providers (which is hard to show in a screenshot).
Checklist