Consolidate SAML/OIDC redirect JavaScript#9985
Conversation
changelog: Internal, Code Quality, Consolidate redirect logic for SAML/OIDC
| @@ -1,13 +1,16 @@ | |||
| <!DOCTYPE html> | |||
| <html> | |||
| <html class="no-js"> | |||
There was a problem hiding this comment.
It'd be nice to have a base-ier base template that we could extend, to avoid having to bring in these individual elements.
There's probably some other features from the base template we want here too, like the lang attribute, some of the meta tags, etc.
| <% if params.key?(:RelayState) %> | ||
| <%= hidden_field_tag('RelayState', params[:RelayState]) %> | ||
| <% end %> |
There was a problem hiding this comment.
could we reuse saml_post_form.html.erb here and pass in :RelayState as form_params?
There was a problem hiding this comment.
could we reuse
saml_post_form.html.erbhere and pass in:RelayStateasform_params?
Maybe! I can check
There was a problem hiding this comment.
There was some prior discussion about this approach with a general leaning toward the duplication? Not sure I'd totally agree, but might save this for a separate effort.
https://github.com/18F/identity-idp/pull/5624/files#r753741166
|
Very strangely the spec failures have something to do with |
This turned out to be caused by a spec helper looking specifically for an HTML opening tag without any attributes. This was made more flexible in cf1c923, to allow for the new |
🛠 Summary of changes
Consolidates
openid-connect-redirect.tsandsaml-post.jspacks to a singleclick-immediate.tswhich immediately clicks any elements annotated with adata-click-immediateattribute.Why?
📜 Testing Plan
Using SAML & OIDC sample applications, verify there are no regressions in signing-in and redirecting back to the partner application.
Repeat testing instructions from #9790 to verify behavior of client-side OIDC redirect.