lib/generators/rodauth/oauth/templates/app/views/rodauth/authorize.html.erb in rodauth-oauth-0.9.3 vs lib/generators/rodauth/oauth/templates/app/views/rodauth/authorize.html.erb in rodauth-oauth-0.10.0
- old
+ new
@@ -32,16 +32,40 @@
<%= label_tag scope, scope, class: "form-check-label" %>
<%= hidden_field_tag "scope[]", scope if is_default %>
</div>
<% end %>
<%= hidden_field_tag :client_id, params[:client_id] %>
- <% %i[access_type response_type state nonce redirect_uri code_challenge code_challenge_method].each do |oauth_param| %>
+ <% %i[access_type response_type response_mode state redirect_uri].each do |oauth_param| %>
<% if params[oauth_param] %>
<%= hidden_field_tag oauth_param, params[oauth_param] %>
<% end %>
<% end %>
- <% if params[:response_mode] %>
- <%= hidden_field_tag :response_mode, params[:response_mode] %>
+ <% if rodauth.features.include?(:oauth_resource_indicators) && rodauth.resource_indicators %>
+ <% rodauth.resource_indicators.each do |resource| %>
+ <%= hidden_field_tag "resource", resource %>
+ <% end %>
+ <% end %>
+ <% if rodauth.features.include?(:oauth_pkce) %>
+ <% if params[:code_challenge] %>
+ <%= hidden_field_tag :code_challenge, params[:code_challenge] %>
+ <% end %>
+ <% if params[:code_challenge_method] %>
+ <%= hidden_field_tag :code_challenge_method, params[:code_challenge_method] %>
+ <% end %>
+ <% end %>
+ <% if rodauth.features.include?(:oidc) %>
+ <% if params[:nonce] %>
+ <%= hidden_field_tag :nonce, params[:nonce] %>
+ <% end %>
+ <% if params[:ui_locales] %>
+ <%= hidden_field_tag :ui_locales, params[:ui_locales] %>
+ <% end %>
+ <% if params[:claims_locales] %>
+ <%= hidden_field_tag :claims_locales, params[:claims_locales] %>
+ <% end %>
+ <% if params[:acr_values] %>
+ <%= hidden_field_tag :acr, params[:acr_values] %>
+ <% end %>
<% end %>
</div>
<p class="text-center">
<%= submit_tag rodauth.oauth_authorize_button, class: "btn btn-outline-primary" %>
<%= link_to rodauth.oauth_cancel_button, "#{rodauth.redirect_uri}?error=access_denied&error_description=The+resource+owner+or+authorization+server+denied+the+request#{"&state=\#{rodauth.state}" if params[:state] }", class: "btn btn-outline-danger" %>