mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 13:05:53 +03:00
[GH-ISSUE #1076] Adding gmail oauth no longer working. #565
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#565
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PaulTGG on GitHub (Jun 9, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1076
Originally assigned to: @christer77 on GitHub.
🐛 Bugreport
Trying to add gmail servers using oauth is broken again. After clicking "continue" as the last step in authorizing the connection, I'm dropped back to the Cypht login page. Cypht is correctly trying to send me back to the servers page, but I'm being sent back to the login page instead. Logging in at that point doesn't add the servers.
Version & Environment
Rev:
e0670e4Steps to reproduce
@indridieinarsson commented on GitHub (Jun 12, 2024):
I have been experiencing the exact same issue. I have cypht (master branch as of a week ago) running as a docker image behind a traefik reverse proxy. One account (standard imap) is set up.
When trying to set up a gmail account (having added the client id and secret from google to the cypht config), I get forwarded to the google page (with touch landing on a google page complaining of a non-verified app), confirm everything and am then redirected to the login page of my cypht as @PaulTGG describes.
I note that the address bar is showing a huge address starting with
https://example.com/?page=home&state=nux_authorization&code=[lots of random letters]&scope=https://mail.google.com/%20https://www.googleapis.com/auth/contactsIf I log in from this page, the gmail account has not been added once I log in.
On the other hand, If I repeat the process, but instead of entering my credentials on the login page, now I simply go to the address bar and press enter (re-navigating to the very long address described above), the login session from before seems to be still active, and I'm not required to log in. This time, I'm redirected to the servers page, and now the gmail account has been added to my list of servers, and I can happily read my emails.
Hope this helps.
@josaphatim commented on GitHub (Jun 14, 2024):
@PaulTGG On my end I'm able to add gmail account. Have you setup these 3 parameters correctly ?
GMAIL_CLIENT_ID=
GMAIL_CLIENT_SECRET=
GMAIL_CLIENT_URI=http://localhost/cypht-jos/?page=home
GMAIL_CLIENT_URI should point to your server + ?page=home
@PaulTGG commented on GitHub (Jun 15, 2024):
I had page=servers before (I've had it work in the past), and I just tried page=home, but had the same result - I get sent back to the login page, as if Cypht didn't remember that I was signed in. I'm currently on
63b9932, and I'm using a database for my settings, if that makes a difference.@josaphatim commented on GitHub (Jun 15, 2024):
Try to logout cypht and login then retry the operation.
@PaulTGG commented on GitHub (Jun 15, 2024):
@josaphatim It looks like it may have had something to do with the SSL set up on my local server. It wasn't forwarding to https appropriately, so I was able to get it work by ensuring I logged in with https to begin with. That said, I was still sent back to the login page, although I was able to make it work with the workaround that @indridieinarsson described above. It doesn't seem like it's working flawlessly.
@marclaporte commented on GitHub (Jun 19, 2024):
@christer77 Please test with v 2.1.0 at https://hub.docker.com/r/cypht/cypht/
@christer77 commented on GitHub (Jun 20, 2024):
Noted, I'll get back to you with feedback
@marclaporte commented on GitHub (Aug 20, 2024):
@PaulTGG @indridieinarsson @christer77
Can you please test with latest stable release? https://github.com/cypht-org/cypht/releases/tag/v2.2.0
@indridieinarsson commented on GitHub (Aug 20, 2024):
@marclaporte : I'm setting up fresh 2.2 installation. Adding gmail now works as expected, and I am redirected to the appropriate page after having confirmed stuff at the gmail page.