Skip to content
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

omniauth: prevent sending a verification email #148

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

ghost
Copy link

@ghost ghost commented Nov 3, 2023

omniauth_registrations_controller.rb fails to create an account when the provider doesn't include a required field. This results in the form being re-rendered leading to a second #create call and the creation of a new request.env, causing the loss of data populated by OAuth and triggering an email confirmation.

See: https://github.com/decidim/decidim/blob/release/0.26-stable/decidim-core/app/commands/decidim/create_omniauth_registration.rb#L75

This patch relies on the params to get the verified_email.

Closes: #147

`omniauth_registrations_controller.rb` fails to create an account when
the provider doesn't include a required field. This results in the form
being re-rendered leading to a second `#create` call and the creation of
a new `request.env`, causing the loss of data populated by OAuth and
triggering an email confirmation.

See: https://github.com/decidim/decidim/blob/release/0.26-stable/decidim-core/app/commands/decidim/create_omniauth_registration.rb#L75

This patch relies on the `params` to get the `verified_email`.

Closes: #147
@ghost
Copy link
Author

ghost commented Nov 3, 2023

Screenshot with the email field removed:

image

@basicavisual basicavisual self-requested a review November 3, 2023 01:47
Copy link
Member

@basicavisual basicavisual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! works as expected

@basicavisual basicavisual merged commit a9cb567 into main Nov 3, 2023
2 checks passed
@ghost ghost deleted the patch-147 branch November 3, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double emails on IDMTY confirmation
1 participant