Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth2 token management: no token stored in database since v20 #30690

Closed
kubajznik opened this issue Aug 20, 2024 · 7 comments
Closed

oauth2 token management: no token stored in database since v20 #30690

kubajznik opened this issue Aug 20, 2024 · 7 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@kubajznik
Copy link
Contributor

Bug

After update from v19 to v20 the tokens are not stored in the database any more. The retrieval of token seems to work fine (green box), but then there is no token stored (see screenshot).
I use this to send email via the SMTPS library. When sending an email now, I get the error, that there is no token stored, but the email gets send anyway.

Dolibarr Version

20.0

Environment PHP

8.2.22

Environment Database

MySQL/MariaDB

Steps to reproduce the behavior and expected behavior

  1. Open token manager on /admin/oauthlogintokens.php
  2. Retrieve new token

Attached files

image

@kubajznik kubajznik added the Bug This is a bug (something does not work as expected) label Aug 20, 2024
@JRFPlows
Copy link

Same Situation, i am still on PHP 7.4.33, went back to 19.0.3.

@eldy
Copy link
Member

eldy commented Oct 2, 2024

A fix has been pushed in v20 branch. Will be available with v20.0.1.
Can someone test with version after commit 52616db and say if its ok now and if sending email using the SMTP with Oauth2 Microsoft works correctly ?

@eldy eldy closed this as completed Oct 2, 2024
@kubajznik
Copy link
Contributor Author

It works, thanks @eldy !

@eldy
Copy link
Member

eldy commented Oct 9, 2024

It works, thanks @eldy !

Did you just test saving thebtoken or did you try and succeed also to send an email with smtp ?

@JRFPlows
Copy link

JRFPlows commented Oct 10, 2024 via email

@kubajznik
Copy link
Contributor Author

For me storing token and sending email - even with attachment - works! We use smtp via Microsoft 365.

@JRFPlows
Copy link

Hi,
sending is no problem, but my e-mail-collecor is not attaching files or documents while the php-imap library is active, when i deactivate back to native php-imap, the collector is collecting e-mails inklusive attachments.
I tested two systems from 19.0 till 20.0.1 with php 7.4.33 till 8.2.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants