Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@
<%= render Core::Button::ButtonComponent.new(label: "Sign out of Login.gov",
destination: login_dot_gov_logout_path,
method: :delete) %>
<% when :login_gov_signin_cancel %>
<%= link_to 'Back to portal home', root_path, class: 'usa-button usa-button--outline', data: { turbo: false }%>
<% when :login_gov_signin_fail %>
<%= link_to 'Back to portal home', root_path, class: 'usa-button usa-button--outline', data: { turbo: false }%>
<% end %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ def no_account
reason = 'no_account'
render(Page::Utility::ErrorComponent.new(nil, reason))
end

def login_gov_signin_cancel
reason = 'login_gov_signin_cancel'
render(Page::Utility::ErrorComponent.new(nil, reason))
end

def login_gov_signin_fail
reason = 'login_gov_signin_fail'
render(Page::Utility::ErrorComponent.new(nil, reason))
end
end
end
end
4 changes: 2 additions & 2 deletions dpc-portal/app/controllers/login_dot_gov_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ def failure
if invitation_flow_match
handle_invitation_flow_failure(invitation_flow_match[2])
elsif params[:code]
@message = 'Something went wrong.'
logger.error 'Login.gov Configuration error'
render(Page::Utility::ErrorComponent.new(nil, 'login_gov_signin_fail'))
else
@message = 'You have decided not to authenticate via login.gov.'
Rails.logger.info(['User cancelled login',
{ actionContext: LoggingConstants::ActionContext::Authentication,
actionType: LoggingConstants::ActionType::UserCancelledLogin }])
render(Page::Utility::ErrorComponent.new(nil, 'login_gov_signin_cancel'))
end
end

Expand Down
4 changes: 4 additions & 0 deletions dpc-portal/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ en:
configuration_complete: Setup complete
api_disabled: API disabled
access_denied: Access denied
login_gov_signin_cancel_status: Login.gov sign-in incomplete
login_gov_signin_cancel_text: Login.gov sign-in was unsuccessful. If this was an error, try signing in again.
login_gov_signin_fail_status: Login.gov sign-in failed
login_gov_signin_fail_text: Something went wrong while trying to sign-in with Login.gov. Please try again.
cd_access:
no_approved_enrollment_status: This organization is not currently approved by Medicare.
no_approved_enrollment_text: This organization must have an approved enrollment status with Medicare to access beneficiary claims data.
Expand Down
Loading