Gmail OAuth Configuration

From Helpdesk 4.2.3, a new feature was added - Google OAuth (based on the Google changes and security improvements). This guide will teach you step-by-step how to configure it on your Helpdesk plugin.

The very first step that you have to do is going to Administration - Helpdesk - OAuth settings tab. Here just enable the OAuth feature and save the changes.

enable_oauth.png

Afterward, please open site cloud.google.com and then click on Console at the top right corner.

google_cloud_console.png

Then click on the Select a project drop-down menu at the top left corner and then New project.

new_project.png

On Project name fill the one that is going to fit your specific case, in our example we just use some testing name.

new_name_of_project.png

Now, we just created our new project. Please click on the central search field and write "api". Click on the Enabled APIs & Services that appears from the drop-down menu.

enable_api_services.png

A new page will open. Now click on + ENABLE APIS AND SERVICES.

enable_plus_services.png

Then again a new page will come - welcome to the API library. Here on the search field type "gmail api".

welcome_to_api_library.png

Afterward click on Gmail API tab.

gmail_api_tab.png

Now enable the Gmail API via the blue button.

enable_gmail_api_button.png

On the newly opened page, go on the right and click on CREATE CREDENTIALS blue button.

create_credentials_button.png

Select User data and then save the changes with the Done button.

user_data_done.png

On the left sidebar click on the OAuth consent screen.

oauth_consent_screen.png

Here just click on the blue Create button without selecting any of the two user types.

create_button_blue.png

Now you have to insert your App name and Gmail account email address.

app_name_and_gmail_email_address.png

Scroll down on the same page, insert the email address of a developer and then hit the button SAVE AND CONTINUE.

dev_email_and_save.png

We continue with the second step here - Scopes. Just click on ADD OR REMOVE SCOPES.

add_or_remove.png

A pop-up window will come on the right. Type "gmail" and click enter.

gmail_click.png

Then apply (enable) the option Gmail API .../auth/gmail.modify, scroll down and save the changes with the UPDATE blue button.

gmail_modify_update.png

The pop-up window will disappear. Now scroll down and hit SAVE AND CONTINUE.

save_main_page_bottom_button.png

We are at the third step now. Click on the + ADD USERS button.

third_step_add_users.png

Once again a pop-up menu will come on the right. Type the email address of your Gmail account (the same email address that you inserted earlier).

add_user_on_the_right.png

When the pop-up window on the right disappears, hit on the SAVE AND CONTINUE button.

save_and_cont_after_user_added.png

You just come to the fourth step - Summary.

summary.png

As the name suggests, here you do nothing, just one quick view the summary information of the changes that we all made by now, scroll down and click on the BACK TO DASHBOARD.

back_to_dashboard.png

Please move your eyes to the left side of your monitor and click on Credentials.

credentials_on_the_left.png

Now click on the + CREATE CREDENTIALS button.

create_plus_button.png

Then click on the OAuth client ID.

oauth_client_id.png

Select the Application type from the drop-down menu to be Web application value as Redmine itself is exactly such type.

Also, write the name of the credentials.

app_type_and_cred_name.png

Return back to the Helpdesk OAuth Google application data and copy the Redirect URL.

redirect_url_copied.png

In the Authorized JavaScript origins field insert the first part of the URL and in the Authorized redirect URIs insert the full URL.

Afterward save the changes with the blue CREATE button.

urs_create_blue_button.png

Now you got the Client ID and Client secret. Copy them one-by-one via the square buttons on the right of each.

client_id_and_client_secret.png

Paste the credentials in the appropriate fields of the Helpdesk OAuth configuration page and apply the changes via the button.

paste_credentials.png

Now, please go to your Helpdesk project in Redmine and in the settings go to the Mail server settings and Incoming mail server in particular. For the Protocol, select value Google OAuth. And for User name just type the Gmail account email address that you use.

protocol_email_helpdesk_projects_settings.png

After you save the changes on that page, an Authorize button automatically will appear there.

authorize_button.png

Just click on it. You will be redirected to the google site to choose an account. Pick the correct one.

pick_gmail_account.png

One more warning (about verification) window will come, just click Continue on it.

verification_continue.png

One final confirmation window will appear for accessing.

redmineup_access_google.png

As a result you get a successful green sign for the authentication in the Helpdesk project settings.

successful_authetication.png

Important note! If you get an error during the authentication, please check the video demonstration to this article (it is located at the end of the written guide, i.e. at the bottom of the page). It contains troubleshooting steps in relation to this problem.

Okay, so we finish our configuration. All is fine. But let's just do a quick test to see if all runs fine. We send one testing email to the Helpdesk Gmail account.

testing_email.png

We go to our Helpdesk and receive the emails (either manually or automatically, it is up to you).

get_two_emails.png

So, yeah, we got our ticket.

helpdesk_ticket.png

We open it as well to check it.

helpdesk_ticket_opened.png

Troubleshooting

  • Zero emails fetched as well as folders are missing. Please see this screenshot reference to make the situation clear.

empty_folders_zero_email.png

Solution: Reboot the server and afterward everything will be fine.

Video demonstration

Was this article helpful? Yes  No
225 from 225 found this helpful