From b051faff80d6e2c4e4bed2be7f157ef27960bf9f Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Fri, 4 Oct 2024 11:20:18 +0200 Subject: [PATCH] OpenID: Clarify the impact of errors to users and admins Related progress issue: https://progress.opensuse.org/issues/167266 --- lib/OpenQA/WebAPI/Auth/OpenID.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/OpenQA/WebAPI/Auth/OpenID.pm b/lib/OpenQA/WebAPI/Auth/OpenID.pm index 082b34aab8fc..24de3d505a6a 100644 --- a/lib/OpenQA/WebAPI/Auth/OpenID.pm +++ b/lib/OpenQA/WebAPI/Auth/OpenID.pm @@ -103,14 +103,19 @@ sub auth_response ($c) { my $err_handler = sub ($err, $txt) { $c->app->log->error("OpenID: $err: $txt"); - $c->flash(error => "$err: $txt"); + $c->flash(error => +"$err: $txt. Please retry again. If this reproduces please report the problem to the system administrators." + ); return (error => 0); }; $csr->handle_server_response( not_openid => sub () { my $op_uri = $params{'openid.op_endpoint'} // ''; - $err_handler->('Failed to login', "OpenID provider '$op_uri' returned invalid data. Please retry again"); + $err_handler->( + 'Failed to login', +"OpenID provider '$op_uri' returned invalid data on a login attempt. Report to the authentication server administrators." + ); }, setup_needed => sub ($setup_url) { # Redirect the user to $setup_url