-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we reuse saml_post_form.html.erb
here and pass in :RelayState
as form_params
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we reuse
saml_post_form.html.erb
here and pass in:RelayState
asform_params
?
Maybe! I can check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.ts
andsaml-post.js
packs to a singleclick-immediate.ts
which immediately clicks any elements annotated with adata-click-immediate
attribute.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.