Hello!
We are running the latest version of Mail receive with OAuth 2.0 to receive and inject mails from Outlook/Office365. The apop works fine for some time, but after some days (7-10, not really sure if it happens regulary after 1 week) the app seems to lose the connection/authorization and stops working (see first picture).
And we receive this error message:
To resolve the issue, we have to reauthorize the app by running the OAuth process again.
The problem is, that we do not always recognize the error message for some time and then no emails are injected to Switch.
Is this how it should work, can we increase the timeout or can we even get this to work without having to reauthorize at all?
Thanks for any suggestions!
Mail receive with OAuth 2.0
Re: Mail receive with OAuth 2.0
We had a similar issue when we installed this app. (Using v2.0 with Switch 2021 Fall) Reached out to the dev and they suggested we check our Switch preferences. You can set Switch to retry after an error.
Under [Error handling > Retry failed external processes after (minutes)], make sure you've got a value set there. We set ours to 5 min and haven't had a problem since.
Hope this helps!
Under [Error handling > Retry failed external processes after (minutes)], make sure you've got a value set there. We set ours to 5 min and haven't had a problem since.
Hope this helps!
- Attachments
-
- Preferences.png (19.26 KiB) Viewed 828 times
Re: Mail receive with OAuth 2.0
When you get the error that there was a timeout then what wkopp wrote applies. It is unfortunately regularly the case that the Outlook cloud service does not always respond quickly. But Switch will retry and you will probably not notice. Reauthenticating is not necessary.
Next to that you can also regularly get the message that the refresh token is no longer valid. In that case you will have to reauthenticate. This is (very) annoying but this is how OAuth2.0 works. The refresh interval depends on the service you are using. Some services allow you to define that period so it is worthwhile checking to see if you can increase it. Some services only allow you to do that when you use the premium version. However, it is unlikely that the validity period will be eternal. That is the price to pay for increased security.
Next to that you can also regularly get the message that the refresh token is no longer valid. In that case you will have to reauthenticate. This is (very) annoying but this is how OAuth2.0 works. The refresh interval depends on the service you are using. Some services allow you to define that period so it is worthwhile checking to see if you can increase it. Some services only allow you to do that when you use the premium version. However, it is unlikely that the validity period will be eternal. That is the price to pay for increased security.