Canceling while granting access results in a critical error

Created on 7 June 2024, 6 months ago
Updated 18 September 2024, 3 months ago

Problem/Motivation

Hello, if you click cancel on the account access confirmation screen, you will receive an error about an unhandled exception BadMethodCallException.

Explanation. Google will redirect the user to the specified redirect_uri, but without the code request parameter, and the getAccessToken call will throw a BadMethodCallException exception that is not handled by the module.

Steps to reproduce

To reproduce the problem, go to the Google login page, and instead of clicking Continue, click Cancel.

Proposed resolution

I suggest not attempting to obtain an access token if the code request parameter is not provided, as this is normal cancellation behavior. I also suggest processing all exceptions and logging them instead of specific ones.

This will improve the user experience by displaying a page with the text "The website encountered an unexpected error. Please try again later." will not help at all, and displaying a message that authorization failed seems more informative.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024