-
Notifications
You must be signed in to change notification settings - Fork 63
Make Gmail integration work without external server #156
Comments
Also, I set the Trash folder to be Gmail's "All mail" folder, so that when I click "Delete" in Nylas it just goes to All Mail, replicating Gmail's archive functionality. However, when I do this the emails are removed from the inbox in Nylas, but in the Gmail web view they still appear in my inbox. My guess as to what's going on is that Gmail is happy to label emails with more than folder. So emails start off in both "All mail" and "Inbox". But since Nylas is on a single folder per email system, it ends up categorising the emails as just in All Mail, picking one of the folders at random. That's my first bug. Then the second one is caused by the fact that when I click "Delete", Nylas sees that as moving from Inbox -> All Mail, but Gmail ignores the move to All Mail as the email is already in there; to replicate the Gmail behaviour Nylas would have to be removing the Inbox tag. All of this is to say: I get why there is a Gmail specific integration, as Gmail doesn't quite act like a normal IMAP server. But the reason I want to use the community fork of Nylas is so that I don't have to share all my email with Nylas-the-company. So is there a way of enabling Gmail OAuth integration, but only grant access to Gmail to my laptop? |
I've taken a walk through the code, and I see this class is what handles the OAuth signin, and I can see it depends on an external server that Gmail can pass the token to once the user has authorised access. |
We could forgo the external server by letting the user copy/paste the token into the app. Alternatively we could try setting up a free heroku instance (not sure if it'd be fast enough; I think Mailspring might be doing something similar for that) |
It would be really great to have the copy & paste token as an advanced option? Plus, it means that if in the future the Nylas servers go down, Nylas Mail could continue to work. |
So on this page Google recommends that in our scenario the best approach is to redirect to localhost (see option 2: "Loopback IP address"). In order to implement this Nylas Mail would have to be able to listen on some local port for the token coming back from Google. This seems like a good approach. From a user perspective this is just as automatic as going via the N1 servers, but requires no external infrastructure to be maintained for this application to keep working, which is always good thing in an open source project. Plus it meets the requirements of paranoid privacy people like me. :) |
Here's a brief example I found of using Electron as a web server, so this seems technically possible. |
EDIT: I've changed the issue description. This paragraph is now probably the best summary of the issue:
Original first comment follows:
When I receive new emails they appear in "All mail", not in my Inbox. I can move them to the Inbox manually, but that's not where they go by default.
Version: https://github.com/nylas-mail-lives/nylas-mail/releases/tag/2.2.1
OS: Ubuntu 16.04
I am syncing a GMail account, but I set it up as a standard IMAP/SMTP server, rather than using the GMail integration, as I wasn't sure who I was authorising to read my emails during the OAuth flow.
The text was updated successfully, but these errors were encountered: