kontron / redmine_oauth

Redmine authentication through OAuth.
GNU General Public License v2.0
57 stars 27 forks source link

Login Button doesn´t work #9

Closed StockyBS closed 1 year ago

StockyBS commented 1 year ago

Hello, The installation worked very well but the Login Button is without function. I´ve tried it in Chrome, Firefox and Edge. It´s a brand new Redmine installation. I´d be very happy about a tip. Best Holger

Environment: Redmine version 5.0.4.stable Ruby version 3.0.2-p107 (2021-07-07) [x86_64-linux-gnu] Rails version 6.1.7 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp Redmine settings: Redmine theme A1 (includes JavaScript) SCM: Git 2.34.1 Filesystem
Redmine plugins: redmine_agile 1.6.4 redmine_oauth 2.0.2

picman commented 1 year ago
  1. Have you configured the plugin in the administration?
  2. Is there any error on log/production.log or in the browser's developer console when you click the button?
StockyBS commented 1 year ago

production.txt

  1. Yes, I configured the plugin and I did the App-registration in the Azure AD
  2. There ar no issues in the log. When I press the button, nothing happend in the console
picman commented 1 year ago

Do we talk about this button

image

and not this one in the plugin's settings?

image

StockyBS commented 1 year ago

Ok, I talk about the second button. This is obviously just the configuration of the button on the login page, sorry. But now I have doubts whether the plugin works as I thought it would. I want to use a cron job to retrieve emails from a helpdesk mailbox and automatically create tickets. the helpdesk user is not logged in. Is this possible with your plugin?

picman commented 1 year ago

Yes, it is. If you don't want to use the plugin to authenticate users, select the empty item in the icon selection in the settings. The button disappears and won't be displayed on the login screen. To use it for IMAP keep the other settings. To retrieve emails call the rake task as it is written in the README.

StockyBS commented 1 year ago

Here is the command line with the result. The user helpdesk is entered as the owner in the azure ad. The IDs and the client secret are entered correctly.

rake -f /opt/redmine/Rakefile redmine_oauth:email:receive_imap username='helpdesk@sps.de' RAILS_ENV="production" project='eingang' --trace

Invoke redmine_oauth:email:receive_imap (first_time) Invoke environment (first_time) Execute environment Execute redmine_oauth:email:receive_imap AUTHENTICATE failed.

picman commented 1 year ago

Enabling IMAP in Azure is pretty complicated. Have you followed all the instructions written here?

https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth#use-client-credentials-grant-flow-to-authenticate-imap-and-pop-connections

Check logs on Azure portal, why the authentication fails. There is not much what I can do with that on the plugin's side.

StockyBS commented 1 year ago

Ok, thank you for your support and your patience.