meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:oauth2 [2024/08/03 08:26] – [The Settings page] duncancplugin:oauth2 [2024/11/20 10:11] (current) – [Installation] duncanc
Line 25: Line 25:
 ===== Installation ===== ===== Installation =====
  
-You need to enable Common Plugin before enabling this plugin and should update Common Plugin to the latest version. On the Manage Plugins page use this package URL +The plugin requires php version 8 and phpList version 3.6.14 or later. You also need to enable Common Plugin before enabling this plugin.
-  https://github.com/bramley/phplist-plugin-common/archive/master.zip+
  
 Install this plugin using the package URL Install this plugin using the package URL
   https://github.com/bramley/phplist-plugin-oauth2/archive/master.zip   https://github.com/bramley/phplist-plugin-oauth2/archive/master.zip
- 
  
  
Line 55: Line 53:
 The plugin uses a package, php-imap2, to retrieve emails from the mailbox. Unlike the php IMAP extension the package does not support POP3, only IMAP. Therefore the mailbox connection settings in config.php will probably need to be changed. For example for Gmail use The plugin uses a package, php-imap2, to retrieve emails from the mailbox. Unlike the php IMAP extension the package does not support POP3, only IMAP. Therefore the mailbox connection settings in config.php will probably need to be changed. For example for Gmail use
  
-''$bounce_mailbox_host = 'imap.gmail.com'; +<code php> 
-$bounce_mailbox_port = '993/imap/ssl';''+$bounce_mailbox_host = 'imap.gmail.com'; 
 +$bounce_mailbox_port = '993/imap/ssl'; 
 +</code>
  
 instead of  instead of 
  
-''$bounce_mailbox_host = 'pop3.gmail.com'; +<code php>$bounce_mailbox_host = 'pop3.gmail.com'; 
-$bounce_mailbox_port = '995/pop3/ssl';''+$bounce_mailbox_port = '995/pop3/ssl';</code>
 ==== The Settings page ==== ==== The Settings page ====
  
Line 75: Line 75:
   https://mysite.com/lists/admin/?pi=OAuth2&page=authorise   https://mysite.com/lists/admin/?pi=OAuth2&page=authorise
  
-===== Use Oauth2 when sending using SMTP =====+ 
 +=== Redirect URL with Microsoft Azure === 
 + 
 +Microsoft has restrictions on whether the redirect URL may contain query parameters, see [[https://learn.microsoft.com/en-gb/entra/identity-platform/reply-url#query-parameter-support-in-redirect-uris]] 
 + 
 +If your account means query parameters in the redirect URL are not allowed then the default value shown above will be rejected when you try to add it within Azure. You will need to use an htaccess redirect rule to work-around this. 
 + 
 +In Azure set the redirect URL to something similar to ''%%https://mysite.com/OAuth2/authorise%%'' then add a rewrite rule to the .htaccess file in the web root directory but adjust if phplist is not installed in the default location 
 + 
 +<code> 
 +# OAuth2 plugin 
 +RewriteCond %{REQUEST_URI}  "/OAuth2/authorise" 
 +RewriteRule ^(.*)$ https://mysite.com/lists/admin/?pi=OAuth2&page=authorise [R=307,L,QSA] 
 +</code> 
 + 
 +=== Use Oauth2 when sending using SMTP ===
  
 You can select to use OAuth2 verification, instead of the normal password verification, when sending emails using SMTP. You can select to use OAuth2 verification, instead of the normal password verification, when sending emails using SMTP.
Line 147: Line 162:
 </code> </code>
  
-To stop logging simply change DEBUG to OFF.+To stop logging simply change ''DEBUG'' to ''OFF''.