Problem/Motivation

Trying to "get access token", I get the message: "No reply address is registered for the application." Do I need to add a redirect URI? If not, then how do I get rid of this message?

I've created another ticket requesting the creation of a README with installation/configuration instructions. Any help will be appreciated.

Comments

jigarius created an issue. See original summary.

jigarius’s picture

Status: Active » Needs review
StatusFileSize
new2.06 KB

I'll be testing 2 things today:

* On the settings page, mention that a reply URL https://example.com/phpmailer_oauth2/aad-callback must be set.
* In the "TrustedRedirectResponse", send redirect_uri=https://example.com/admin/config/system/phpmailer-oauth2 so the user is brought back to where they started.

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.

For now, I'm adding a patch. Once I've tested it to be working, I'll create a merge request.

In general, thanks for the module!

imclean’s picture

Thanks for your interest @jigarius, it could certainly do with some refinement. Would you be interested in becoming a maintainer? We're not able to maintain this module to the standard I'd like.

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.

Good idea. It would also be nice to have a standard way of providing a config form.

I'll add you as a maintainer but please let me know if aren't interested.

jigarius’s picture

Hey! Sounds good to me. I'll try to get things organized and maybe add support for Google Mail if time permits. Thanks.

imclean’s picture

Thanks @jigarius. In terms of this patch, it looks clean and useful. We were able to login without specifying the redirect_uri so I guess as long as adding it doesn't break any existing sites then it looks good to me.

imclean’s picture

Category: Support request » Feature request

This could possibly be a bug report but as it was working for us without the change I'll set it to a feature request for now.

imclean’s picture

Status: Needs review » Reviewed & tested by the community

Let's get things moving here. Feel free to commit this if it's working for you.

  • imclean committed 47a4615e on 1.0.x authored by jigarius
    Issue #3316295 by jigarius: No reply address is registered for the...
imclean’s picture

Status: Reviewed & tested by the community » Fixed
Related issues: +#3336305: PHPMailer OAuth2: Clean up code

I've committed this and created a new issue for the code clean up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.