PHPMailer OAuth2: Clean up code

Created on 25 January 2023, almost 2 years ago
Updated 16 March 2023, over 1 year ago

Problem/Motivation

@jigarius in #3316295-2: No reply address is registered for the application :

In general, while looking at the code, I had some thoughts which I'll share here (thinking aloud for the maintainers to hear).

  • Maybe standardize the nomenclature a bit? Some places, say AAD, some places say Azure, some places it says MS. Maybe, a standard terminology should be used in all places?
  • There are 2 controllers for Microsoft at the moment - one is the MsOauth2CallbackController and one is the MsLoginController. To keep things organized, maybe both of them could be merged into a, say, AzureOauth2CallbackController with two methods: "login()" and "callback()". This way, we can have individual controllers for other services like GoogleOauth2Controller, etc. in the future. The module might contain submodules in the future, like phpmailer_oauth2_azure and phpmailer_auth2_google to keep things organized.

Other ideas

  • Provide standard way of providing a config form
  • Store tokens in state rather than config
  • Use composer's "suggests" for external libraries instead of requiring them all in the case of multiple OAuth2 providers

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia imclean Tasmania

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

Comments & Activities

Production build 0.71.5 2024