[GH-ISSUE #205] Help with oauth2 gmail - redirect URI? #169

Closed
opened 2026-02-25 21:34:20 +03:00 by kerem · 4 comments
Owner

Originally created by @szilardx on GitHub (Jun 18, 2017).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/205

Originally assigned to: @jasonmunro on GitHub.

I am trying to set up oauth2 autentication for one of my gmail accounts. I would like to try out the gmail contacts module.
I tried everything I could think of, now am a trying to do it from a freshly installed cypht instance.

I set a Google Gmail API Project - created the credentials. - although I am not sure what to put at the redirect URI field on the Google site - so I got confused what to put in the site_URI filed for the oauth2.ini
I tried it with my setup's address.

So far when I try to add a gmail account in cypht, nothing special happens - so I guess oauth2 is not working for me. Could you help me with this?
Thank you very much!

Originally created by @szilardx on GitHub (Jun 18, 2017). Original GitHub issue: https://github.com/cypht-org/cypht/issues/205 Originally assigned to: @jasonmunro on GitHub. I am trying to set up oauth2 autentication for one of my gmail accounts. I would like to try out the gmail contacts module. I tried everything I could think of, now am a trying to do it from a freshly installed cypht instance. I set a Google Gmail API Project - created the credentials. - although I am not sure what to put at the redirect URI field on the Google site - so I got confused what to put in the site_URI filed for the oauth2.ini I tried it with my setup's address. So far when I try to add a gmail account in cypht, nothing special happens - so I guess oauth2 is not working for me. Could you help me with this? Thank you very much!
kerem closed this issue 2026-02-25 21:34:20 +03:00
Author
Owner

@jasonmunro commented on GitHub (Jun 18, 2017):

The redirect URI in your Google app should be the URL of your cypht install, which should also be the value in your oauth2.ini file for client_uri. In order to use oauth2 over IMAP for Gmail and contacts, you need to use the "add E-mail" dialog from the nux module set. This should prompt you about using oauth2, then redirect you to Google to approve the oauth2 access, then redirect you back to your site with the newly added account (which should include IMAP, SMTP, and contacts).

<!-- gh-comment-id:309301582 --> @jasonmunro commented on GitHub (Jun 18, 2017): The redirect URI in your Google app should be the URL of your cypht install, which should also be the value in your oauth2.ini file for client_uri. In order to use oauth2 over IMAP for Gmail and contacts, you need to use the "add E-mail" dialog from the nux module set. This should prompt you about using oauth2, then redirect you to Google to approve the oauth2 access, then redirect you back to your site with the newly added account (which should include IMAP, SMTP, and contacts).
Author
Owner

@szilardx commented on GitHub (Jun 18, 2017):

Thanks for the quick response.
The things I did:

  • I created a new project in the Google API's manager. Enable Gmail API.
  • Generated Oauth Client ID.
  • Copied the client ID, and client secret to the oauth2.ini, and filled in the client_uri field.
  • Copied the oauth2.ini to /usr/local/share/cypht - next to the working hm3.ini.
  • Regenerated the configuration.
  • I am trying the Add email - Gmail dialog, but it just prompts me for username, and password, as before, then successfully adds the email account - without oauth dialog.
<!-- gh-comment-id:309302445 --> @szilardx commented on GitHub (Jun 18, 2017): Thanks for the quick response. The things I did: - I created a new project in the Google API's manager. Enable Gmail API. - Generated Oauth Client ID. - Copied the client ID, and client secret to the oauth2.ini, and filled in the client_uri field. - Copied the oauth2.ini to /usr/local/share/cypht - next to the working hm3.ini. - Regenerated the configuration. - I am trying the Add email - Gmail dialog, but it just prompts me for username, and password, as before, then successfully adds the email account - without oauth dialog.
Author
Owner

@jasonmunro commented on GitHub (Jun 18, 2017):

Maybe the oauth2.ini file location is the problem - it should be in the app_data_dir as defined in your hm3.ini file. Is that set to /usr/local/share/cypht?

<!-- gh-comment-id:309306513 --> @jasonmunro commented on GitHub (Jun 18, 2017): Maybe the oauth2.ini file location is the problem - it should be in the app_data_dir as defined in your hm3.ini file. Is that set to /usr/local/share/cypht?
Author
Owner

@szilardx commented on GitHub (Jun 18, 2017):

Thank you! I have gone through that setting option too, but was looking too hard for the mistake, so I missed it!
I used a bad directory. Thanks for the help, and this great application!

<!-- gh-comment-id:309307721 --> @szilardx commented on GitHub (Jun 18, 2017): Thank you! I have gone through that setting option too, but was looking too hard for the mistake, so I missed it! I used a bad directory. Thanks for the help, and this great application!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#169
No description provided.