Skip to content

Do not show "Thanks for signing up" flash to existing members completing their profile #2788

Description

@mroderick

Problem

The "Thanks for signing up" flash (notifications.signing_up, shown in
Member::DetailsController#edit) is misleading for returning members. It reads
as if a brand-new (duplicate) account was created, when in fact the member was
simply routed to the "Almost there..." details page because their profile is
incomplete.

This is a residual of the 28 Jul /auth/codebar feedback and remains after
#2785 (which gates the details redirect on
member.requires_additional_details?). A complete member no longer hits this
path, but an incomplete existing member (missing any of
name/surname/about_you) still does — and still gets told "Thanks for signing
up", which is wrong for a returning account.

Proposed fix

Only flash signing_up when the member was actually created during the OAuth
callback, not when an existing member is sent to the details page.

In AuthServicesController#create, the else branch already tracks whether the
member was created (member.save! succeeded on a new record). Pass that signal
through so a find-existing redirect doesn't set the signup flash. The details
controller should show "Thanks for signing up" / "Almost there..." only for
genuinely new members; existing members should get a neutral message (e.g.
"Please complete your profile") or none.

Acceptance criteria

  • An existing, incomplete member logging in via a new provider is sent to
    the details page without the "Thanks for signing up" flash.
  • A brand-new member still sees the "Thanks for signing up" flash.
  • Specs cover both cases (extend auth_services_callback_spec.rb / the
    details feature spec).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions