Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to retrieve or output the custom deny reason (error_description) #287

Closed
piljac1 opened this issue May 31, 2022 · 1 comment · Fixed by #288 or #289
Closed

Impossible to retrieve or output the custom deny reason (error_description) #287

piljac1 opened this issue May 31, 2022 · 1 comment · Fixed by #288 or #289

Comments

@piljac1
Copy link

piljac1 commented May 31, 2022

SDK Version

7.0

PHP Version

PHP 8.1

Composer Version

2.x

What happened?

In the Callback controller, there seems to be some undesired (or unexpected) behavior regarding the error description.

See the following code (line 43):

$errorDescription = is_string($errorDescription) ? $error : '';

Since the $error content is assigned instead of the $errorDescription, it is impossible to retrieve a custom reason that was specified when denying access.

How can we reproduce this issue?

  1. Add a listener to the AuthenticationFailed event and dd($event->getException()->getMessage()); within the handle method.
  2. Deny access (with a custom reason) in an action and link the action to the login flow.
  3. Try to login, the access denial is hit as expected, but the error description is not the one that is expected. Instead, access_denied: access_denied is output.

Additional context

No response

@evansims
Copy link
Member

Hi @piljac1 👋 Thanks for the heads-up! I'm getting a fix drafted right now.

@evansims evansims added bug and removed triage labels May 31, 2022
@evansims evansims mentioned this issue Jun 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants