mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
This PR adds the following changes 1. Add `Imap::GoogleFetchEmailService` and `Google::RefreshOauthTokenService`. The `Google::RefreshOauthTokenService` uses `OmniAuth::Strategies::GoogleOauth2` which is already added as a packge 2. Update `Inboxes::FetchImapEmailsJob` to handle Google inboxes 3. Add SMTP settings for Google in `ConversationReplyMailerHelper` to allow sending emails ## Preview #### Incoming emails  #### Outgoing email  --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
10 lines
397 B
Ruby
10 lines
397 B
Ruby
# Refer: https://learn.microsoft.com/en-us/entra/identity-platform/configurable-token-lifetimes
|
|
class Microsoft::RefreshOauthTokenService < BaseRefreshOauthTokenService
|
|
private
|
|
|
|
# Builds the OAuth strategy for Microsoft Graph
|
|
def build_oauth_strategy
|
|
::MicrosoftGraphAuth.new(nil, GlobalConfigService.load('AZURE_APP_ID', ''), GlobalConfigService.load('AZURE_APP_SECRET', ''))
|
|
end
|
|
end
|