lib/generators/rodauth/oauth/templates/app/views/rodauth/authorize.html.erb in rodauth-oauth-0.10.4 vs lib/generators/rodauth/oauth/templates/app/views/rodauth/authorize.html.erb in rodauth-oauth-1.0.0.pre.beta1
- old
+ new
@@ -1,10 +1,10 @@
<%= form_tag rodauth.authorize_path, method: :post do %>
<% if rodauth.oauth_application[rodauth.oauth_applications_logo_uri_column] %>
<%= image_tag rodauth.oauth_application[rodauth.oauth_applications_logo_uri_column] %>
<% end %>
- <p class="lead">The application <%= link_to rodauth.oauth_application[rodauth.oauth_applications_name_column], rodauth.oauth_application[rodauth.oauth_applications_homepage_url_column] %> would like to access your data.</p>
+ <p class="lead"><%= rodauth.authorize_page_lead(name: link_to(rodauth.oauth_application[rodauth.oauth_applications_name_column], rodauth.oauth_application[rodauth.oauth_applications_homepage_url_column])).html_safe %></p>
<div class="list-group">
<% if rodauth.oauth_application[rodauth.oauth_applications_tos_uri_column] %>
<%= link_to rodauth.oauth_applications_tos_uri_label, rodauth.oauth_application[rodauth.oauth_applications_tos_uri_column], class: "list-group-item" %>
<% end %>
@@ -21,17 +21,15 @@
<% end %>
</div>
<% end %>
<div class="form-group">
- <h1 class="display-6"><%= rodauth.oauth_tokens_scopes_label %></h1>
+ <h1 class="display-6"><%= rodauth.oauth_grants_scopes_label %></h1>
- <% rodauth.scopes.each do |scope| %>
- <% is_default = scope == rodauth.oauth_application_default_scope %>
+ <% rodauth.authorize_scopes.each do |scope| %>
<div class="form-check">
- <%= check_box_tag "scope[]", scope, is_default, disabled: is_default, id: scope, class: "form-check-input" %>
+ <%= check_box_tag "scope[]", scope, id: scope, class: "form-check-input" %>
<%= 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 response_mode state redirect_uri].each do |oauth_param| %>
<% if params[oauth_param] %>