-
Notifications
You must be signed in to change notification settings - Fork 164
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
Review the whole process/code/documentation for Cypht to work for Google and Microsoft's email offerings. (was: Error Ocurred when attempting gmail oauth2 setup) #776
Comments
Thank you @Terramoto for this report. Can you try with debug mode activated as per https://cypht.org/install.html ? Thanks! |
I'm afraid it doesn't seem to work, i'm using the docker version provided in the README:
I've tried to set the display_errors on in the PHP.ini file but that hasn't made much of a difference. |
@rodriguezny How can we activate errors in Cypht Docker? |
@Terramoto did you try to visualize the container log ? |
@rodriguezny Yes, i'm afraid it was only showing the access logs, as in POST GET requests and response codes. I went to check this morning and found there's a php.ini-development in
|
Thanks @Terramoto for the report. Did you try to setup gmail auth2 on cypht outside docker (no docker version) ? If no, you can try it and provide us feedback waiting for us to come back to you with the fix/solution ? |
For the record: https://github.com/cypht-org/cypht/wiki/OAUTH2-over-IMAP |
Thank you @marclaporte ! |
I've managed to enable some logging:
It looks like the cause is: Line 42 in c240489
I've disabled fingerprint in h3m.ini, now i get the following:
How to enable debug: Line 18 in c240489
|
I'm reopening this issue because i had been told previously the docker image was not properly maintained, so i started from fresh. The issue with Oauth2 repeats on this new setup, a normal imap account works. What i'm noticing with this one is that the authorization token takes a while, after signing in to the webmail, and this seems to be because it's calling sendmail. |
I had an issue - Google would redirect me back to Cypht after I approved oauth2 access, BUT the Cypht webpage was only showing a login page even though I had been logged in moments ago. If i entered my username/pass and logged in, the oauth2 (gmail) account would not have been added to Cypht. After many identical failures, i noticed when I was redirect back to Cypht after authorizing access in Gmail, I would be at the login prompt but the URL in my browser address bar was obviously an approval of some sort. So I copied the URL and instead of logging into Cypht I just hit back on my browser a few times until I was back in Cypht (still logged in!) and pasted the URL into my address bar. Hitting enter would finish adding Gmail to Cypht, success at last! I believe when adding my oauth2 app at google, i used my Cypht install URL (https://webmail.domain.tld/) as the redirect_uri (i have never understood if this is redirect_uri or redirect_urL) and I think the issue is related. Nothing mentions which URL to use. Another note - if you don't add the redirect_uri when creating the oath2 app/auth at Google, but instead add it later, it doesn't work. It only works (for me) when you add it during the original oauth creation process even though it allows you to add one later. It could be that it would eventually work - there is a delay of some sort. |
@kambereBr Please review the whole process/code/documentation for Cypht to work for Google and Microsoft's email offerings. Here is the current documentation: https://github.com/cypht-org/cypht/wiki/OAUTH2-over-IMAP It states: This is too complicated. Please explore a way for users to do this via the web interface (like for IMAP accounts). FYI, Henock is working on a revamp of the whole setup process (Making it easier to set up IMAP, SMTP and connect them together) so you should be in touch with him to converge efforts. Ref: https://avan.tech/item81120 (internal link, sorry if you don't have access). First make it work with the standard installation procedure. Once this is working well, please revisit the Docker install with @rodriguezny Thanks! |
@marclaporte, Noted. Thank you! |
@christer77 You closed this. Is it simple now? The https://github.com/cypht-org/cypht/wiki/OAUTH2-over-IMAP is still too complicated (ex.: re-run the config_gen.php) and it's still mentioning hm3.ini (which no longer exists in Cypht 2+) I suggest you take a non geeky friend or family member and ask them to set this up, while you watch. |
Related issue: #1351 |
I'm running the docker version, i've:
The file is detected during the config_gen.php, i then proceed to the interface:
I've notice the redirect URL sends two scopes:
?state=nux_authorization&code=(Authorization-Code)&scope=https://mail.google.com/%20https://www.googleapis.com/auth/contacts
I've tried removing the second scope and this time i got the "Error Ocurred" message but it didn't signed me off....
The text was updated successfully, but these errors were encountered: