Skip to content

Commit

Permalink
Merge pull request #148 from CodeandoMexico/patch-147
Browse files Browse the repository at this point in the history
omniauth: prevent sending a verification email
  • Loading branch information
basicavisual authored Nov 3, 2023
2 parents 23ebd01 + f60ceea commit a9cb567
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: production
image-tag: 1.4
image-tag: 1.5
custom-args: --build-arg RAILS_ENV=production --build-arg FORCE_SSL=false --build-arg SECRET_KEY_BASE=${{ secrets.SECRET_KEY_BASE }} --build-arg MAILER_SENDER=${{ secrets.MAILER_SENDER }}
dockerfile: docker/decidim.Dockerfile
build-context: .
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Decidim::Devise::OmniauthRegistrationsController.class_eval do
private

def verified_email
@verified_email ||= oauth_data.dig(:info, :email) || params.dig(:user, :email)
end
end
46 changes: 46 additions & 0 deletions app/views/decidim/devise/omniauth_registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<div class="wrapper">
<div class="row collapse">
<div class="row collapse">
<div class="columns large-8 large-centered text-center page-title">
<h1><%= t(".sign_up") %></h1>
<p>
<%= t(".subtitle") %>
</p>
</div>
</div>

<div class="row">
<div class="columns large-6 medium-10 medium-centered">
<div class="card">
<div class="card__content">
<%= decidim_form_for(@form, namespace: "registration", as: resource_name, url: omniauth_registrations_path(resource_name), html: { class: "register-form new_user" }) do |f| %>
<%= form_required_explanation %>

<div class="user-person">
<div class="field">
<%= f.text_field :name, help_text: t(".username_help") %>
</div>
</div>

<div class="user-person">
<div class="field">
<% @form.nickname = nil %>
<%= f.text_field :nickname, help_text: t(".nickname_help", organization: current_organization.name) %>
</div>
</div>

<%= f.hidden_field :email %>
<%= f.hidden_field :uid %>
<%= f.hidden_field :provider %>
<%= f.hidden_field :oauth_signature %>

<div class="actions">
<%= f.submit t(".complete_profile"), class: "button expanded" %>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>
</div>

0 comments on commit a9cb567

Please sign in to comment.