From b5d6e5bc56ede4759b3c057ef33eccbae9cae5b4 Mon Sep 17 00:00:00 2001 From: 24c02 <163450896+24c02@users.noreply.github.com> Date: Fri, 5 Dec 2025 21:52:17 -0500 Subject: [PATCH] fix for signup -> oauth --- app/controllers/identities_controller.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/identities_controller.rb b/app/controllers/identities_controller.rb index cf3295d..9db4a0a 100644 --- a/app/controllers/identities_controller.rb +++ b/app/controllers/identities_controller.rb @@ -101,11 +101,18 @@ class IdentitiesController < ApplicationController @identity = Identity.new(attrs) if @identity.save + # If returning to an OAuth flow, skip Slack provisioning redirect + next_action = if @return_to.present? && @return_to.start_with?("/oauth/authorize") + "home" + else + @onboarding_scenario.next_action.to_s + end + login_attempt = LoginAttempt.create!( identity: @identity, authentication_factors: {}, provenance: "signup", - next_action: @onboarding_scenario.next_action.to_s, + next_action: next_action, return_to: @return_to )