πŸ‡ΊπŸ‡ΈUnited States @frymorgan

Account created on 6 November 2011, about 13 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States frymorgan

Is the return type the same? Or should it be:

'redirect_uri' => Url::fromRoute('phpmailer_oauth2.settings')->setAbsolute()->toString(TRUE)->getGeneratedUrl()

Using getGeneratedUrl() is correct after all. Problem was the route should be phpmailer_oauth2.aad_callback, not phpmailer_oauth2.settings.

As it stands, it does not insert a redirect_url into the response at all, which works if the Azure app has only one Redirect URI.

πŸ‡ΊπŸ‡ΈUnited States frymorgan

Is the return type the same? Or should it be:

'redirect_uri' => Url::fromRoute('phpmailer_oauth2.settings')->setAbsolute()->toString(TRUE)->getGeneratedUrl()

toString(TRUE) returns a genreatedURL type, appending getGeneratedUrl() will return a string.

NB, the previous version (before the change in #3316295), after this patch also works. (Drupal 9.5, PHP 8.1)

With redirect_uri' => Url::fromRoute('phpmailer_oauth2.settings')->setAbsolute()->toString(TRUE)->getGeneratedUrl(), Azure returns an error because /admin/config/system/phpmailer-oauth2 is not the callback url defined in the Azure app.

πŸ‡ΊπŸ‡ΈUnited States frymorgan

Patch to the above effect.

πŸ‡ΊπŸ‡ΈUnited States frymorgan

frymorgan β†’ created an issue.

Production build 0.71.5 2024