-
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
Changes from 1 commit
d744af1
934eccc
3594113
c928e52
3900738
cf1c923
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
document | ||
.querySelectorAll<HTMLElement>('[data-click-immediate]') | ||
.forEach((element) => element.click()); |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<html class="no-js"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title><%= t('headings.redirecting') %> | <%= APP_NAME %></title> | ||
<%= javascript_tag(nonce: true) do %> | ||
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/, 'js'); | ||
aduth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<% end %> | ||
<%= csrf_meta_tags %> | ||
<%= stylesheet_link_tag 'application', media: 'all' %> | ||
<%= render_stylesheet_once_tags %> | ||
<%= render_javascript_pack_once_tags 'saml-post' %> | ||
</head> | ||
<body> | ||
<div class="grid-container tablet:padding-y-6"> | ||
<div class="grid-container tablet:padding-y-6 no-js"> | ||
<div class="grid-row"> | ||
<div class="tablet:grid-col-6 tablet:grid-offset-3"> | ||
<%= render PageHeadingComponent.new.with_content(t('.heading')) %> | ||
|
@@ -18,16 +20,17 @@ | |
<%= t('.no_js') %> | ||
</p> | ||
|
||
<%= form_tag action_url, id: 'saml-post-binding' do %> | ||
<%= simple_form_for('', url: action_url) do |f| %> | ||
<%= hidden_field_tag('csp_uris', csp_uris) if Rails.env.test? %> | ||
aduth marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<%= hidden_field_tag(type, message) %> | ||
<% if params.key?(:RelayState) %> | ||
<%= hidden_field_tag('RelayState', params[:RelayState]) %> | ||
<% end %> | ||
Comment on lines
25
to
27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we reuse There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Maybe! I can check There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
<%= submit_tag t('forms.buttons.submit.default'), class: 'usa-button usa-button--wide usa-button--big' %> | ||
<%= f.submit t('forms.buttons.submit.default'), data: { click_immediate: true } %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
<%= render_javascript_pack_once_tags 'click-immediate' %> | ||
</body> | ||
</html> |
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.