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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | phpmailer_oauth2--3316295-redirect-uri.patch | 2.06 KB | jigarius |
Comments
Comment #2
jigariusI'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!
Comment #3
imclean commentedThanks 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.
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.
Comment #4
jigariusHey! Sounds good to me. I'll try to get things organized and maybe add support for Google Mail if time permits. Thanks.
Comment #5
imclean commentedThanks @jigarius. In terms of this patch, it looks clean and useful. We were able to login without specifying the
redirect_uriso I guess as long as adding it doesn't break any existing sites then it looks good to me.Comment #6
imclean commentedThis 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.
Comment #7
imclean commentedLet's get things moving here. Feel free to commit this if it's working for you.
Comment #9
imclean commentedI've committed this and created a new issue for the code clean up.