Etuldan / spaRSS

Based on Flym and Sparse RSS, this checks RSS/Atom news feeds, polling for updates from the device on a regular basis. Fetched items are available for offline reading.
Other
146 stars 31 forks source link

RSS with authentication in gmail don't work #141

Open Bishop341-B opened 8 years ago

Bishop341-B commented 8 years ago

Checking with version 1.11.2

with: https://mail.google.com/mail/feed/atom and http://mail.google.com/mail/feed/atom can get only gmail icon with this text on the left side: "Error: At line 1, column 4: not well-for..."

with: http://gmail.google.com/gmail/feed/atom can get only gmail icon with this text on the left side: "Error: lenght=20; regionStart=0; regi..." and with https://gmail.google.com/gmail/feed/atom get the same as with https://mail.google.com/mail/feed/atom ("Error: At line 1, column 4: not well-for...")

All four variations are working ok with Thunderbird in desktop, despite the canonical url, as in google help stated, is https://mail.google.com/mail/feed/atom

From https://developers.google.com/gmail/gmail_inbox_feed

About Atom

Atom is a system which makes it easy for you to receive, in one place, regular updates from news websites, blogs, and/or Gmail. You can use Atom with an aggregator (also known as a newsreader, feed reader, or RSS/Atom reader) to receive new message alerts. Note: This feed is only available for Gmail accounts on Google Apps domains. Using the Inbox Feed

The Gmail Inbox Feed will output your Inbox as an XML document. You can use an RSS aggregator to view this, or you can consume the feed with your own app. OAuth 2.0 is the preferred authentication method, using the scope https://mail.google.com/mail/feed/atom and >fetching the feed with the request GET https://mail.google.com/mail/feed/atom

Etuldan commented 8 years ago

I can't see the feed page (https://mail.google.com/mail/feed/atom) in my desktop browser. I removed the cookies concerning google/gmail, then visited the feed in Firefox, but the Auth is refusing my credentials (according to this https://github.com/Etuldan/spaRSS/issues/44#issuecomment-131579785 , so without the @gmail.com ) Did I miss something ? Maybe it's because of my Authenticator ?

Etuldan commented 8 years ago

Ok, found, need to define a new 'unique' password here : https://security.google.com/settings/security/apppasswords?utm_source=OGB&pli=1

Etuldan commented 8 years ago

And with this 'unique' credential, It's working on my spaRSS debug build (and should be working on the stable, as nothing related to this has changed) If you still experiment the issue, could you send me the content of the your XML feed (plaintext) (is there is nothing 'private' ofc)

Bishop341-B commented 8 years ago

It is strange... I don't have app password activated in my gmail account (it is an old account), but in desktop, login in Firefox browser and Thunderbird, and RSS works ok, but not in spaRSS. I have tested more accounts with same results. All this accounts are "old" with app password not activated. I will do some more tests.

ildar commented 8 years ago

this may be the security protection by Google. Check your incoming mail and account security page.

Bishop341-B commented 8 years ago

I made a new gmail account for testing, with two pass activation and app password generated. No luck, same results. No messages in google security page. Password seems working, testing with wrong password gives no error at all, but also NO gmail icon, right password gives error text AND gmail icon. Tested with Thunderbird and FireFox, working as usual, with app password

Attaching the feed as I get it in desktop browser.

feed.txt

Edit: I don't know exactly what i did before, but with fresh new feed configuration, NO entering password gives the same error text AND gmail icon. It seems that yes, this may be some security problem. Doing some more tests.

Bishop341-B commented 8 years ago

Well, some progress on this...

Tested one of my first gmail account on other phone with fresh installed spaRSS. It worked at first try. This account don't have two pass and app password activated, it seems that this is not necessary.

Did fresh install (including deleting spaRSS data and cache before reinstall) on my phone and using the same account don't work. My phone is running 4.1.2, the phone on it worked is running 4.4.2

May be some problem with any api library? Or simply something is wrong on my phone ? Any idea on this?