Not connecting
mvaneijgen opened this issue · comments
Does this stil work? The last update is a half year ago and I can't get it to work. Tried both my username with and without @gmail.com
(both are in my keychain btw). The where
field for my login credentials is https://accounts.google.com
, but I changed it to https://mail.google.com. this also doesn't work.
Any help would be appreciated.
Probably not 😞
I know it doesn't work if you have MFA turned on. I can take a look later this week/weekend.
Sorry for the trouble 😿
No trouble, just thought it would be nice to have on my desktop. What is MFA?
Multi-Factor Authentication - do you use google's authenticator app or get a text message to sign in? I haven't figured out how to implement that with übersicht's architecture yet. IIRC the widget uses the google atom feed - I think its functionality is pretty limited, I'll look into a more robust solution when I get a chance.
Can't you not just use a app specific password for it?
Definitely maybe. If you get it working lmk and I'll update as necessary.
Lol, I really have no idea how to write this kind of code. I've created a new property pass
and gave it my app specific password.
and changed the command to command: "security find-internet-password -ga #{username} 2>&1 | grep \"password\" | sed -e 's/^[^\"]*\"//' -e 's/\".*$//' | xargs -I pass curl -su #{username}:#{pass} https://mail.google.com/mail/feed/atom || echo \"null\""
And it works!
Hello @mvaneijgen It would help me a lot if I could get this mail count to work. Could you tell me more how you did it? I'm not a developer and I'm not sure how to create a pass property and give it my app specific password. Thanks a lot!
Hey @marcelkunzler also not a developer, but here is the code I use
username = "" # enter your gmail account username here
pass = "" # enter your app spesific password
command: "security find-internet-password -ga #{username} 2>&1 | grep \"password\" | sed -e 's/^[^\"]*\"//' -e 's/\".*$//' | xargs -I pass curl -su #{username}:#{pass} https://mail.google.com/mail/feed/atom || echo \"null\""
refreshFrequency: 600000 # refresh every 10 seconds (10k ms)
render: (_) -> """
<div class='count'>↭</div>
<div class='ts hidden'></div>
"""
update: (output, domEl) ->
# feel free to modify these to fit your workflow/inbox
lowcount_color = '#fff'
lowcount_max = 9
midcount_color = '#fff'
midcount_max = 14
highcount_color = '#fff'
fullcount_regex = /.*<fullcount>(\d+)<\/fullcount>.*/
fullcount_match = output.match(fullcount_regex)
if fullcount_match
fullcount = fullcount_match[1]
$(domEl).find('.count').text fullcount
$(domEl).find('.ts').addClass('hidden')
$(domEl).find('.ts').text('as of ' + @ftime())
if fullcount <= lowcount_max
$(domEl).find('.count').css color: lowcount_color
else if fullcount > lowcount_max and fullcount <= midcount_max
$(domEl).find('.count').css color: midcount_color
else
$(domEl).find('.count').css color: highcount_color
else
$(domEl).find('.ts').removeClass('hidden')
style: """
bottom: 10px
right: 30px
color:#fff
font-family:Helvetica Neue
font-weight: 100
text-align:center
.count
font-size:7em
.ts
font-size:1em
.hidden
display:none
"""
ftime: () ->
localtime = new Date()
timestamp = (localtime.getHours() % 12 || 12) + ':' + (localtime.getMinutes() < 10 && 0 + localtime.getMinutes() || localtime.getMinutes()) + ' ' + (localtime.getHours() < 12 && 'AM' || 'PM')
Hope it helps,
Hello @mvaneijgen Thanks for your reply! Unfortunately, no luck. I still get the "illegal token" warning and the no-connection sign gets rendered. Any ideas? Is your widget still working properly? Thanks again!
Do you use a Google account with 2 step authentication?
No. I just log in ordinarily. I also have the details in my iCloud Keychain and the same credentials connected on "Internet Accounts"
I have, in the past, verified myself within Gmail, by responding to SMS messages. But it is not something I do every login.
Than I can't help you this is for two factor authentication.
I just activated 2-step auth, generated an app specific password, but still no luck. Isn't there another step to be taken? Do you also get the "illegal token" warning? Even if it seems to be working properly? Thnks a lot, friend!
Any thoughts on this @wfalkwallace? You seem to be the only one who bothered to make a widget for Gmail users, which is surprising. Thanks in advance.
Sorry, I haven't had much time for this in a while - I'll try to take another look soon.