feat: ensure account is present

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Shivam Mishra
2025-06-09 16:06:04 +05:30
committed by GitHub
co-authored by Copilot
parent 2584d6dcba
commit 9b3148e16d
+4 -1
View File
@@ -84,7 +84,10 @@ class OauthCallbackController < ApplicationController
def account_from_signed_id
raise ActionController::BadRequest, 'Missing state variable' if params[:state].blank?
GlobalID::Locator.locate_signed(params[:state])
account = GlobalID::Locator.locate_signed(params[:state])
raise 'Invalid or expired state' if account.nil?
account
end
def account