ntawileh / obsidian-google-lookup

Obsidian plugin that pulls contact and calendar event information from your Google account
https://ntawileh.github.io/obsidian-google-lookup
MIT License
77 stars 10 forks source link

Creating account when the target Google Account has email aliases yields wrong account name #14

Open dgreen opened 2 years ago

dgreen commented 2 years ago

I have an account like

account@gmail.com

which has send as for name1@univ.edu, name2@gmail.com in addition to account@gmail.com

While logged in as acccount@gmail.com and in the plugin creating an account, it properly shows account@gmail.com on the OAUTH page presented by Google. I check allowing access for the list of items.

I get a message saying 'OK - You can close this tab and go back to Obsidian!'

There I see the account added as name1@univ.edu rather than account@gmail.com

It does appear to access events that are later in the day.

Duifkruid commented 1 year ago

I have the same problem, and although Contact are readable, no events are showing in Command Pallette. I have no issue with the sudden unexpected email in the account name (although curious), but wondering if this could be the reason no events show up, as the email is not granted any testing rights? Will try to add it as tester in the OAuth. Still weird.

ntawileh commented 1 year ago

@Boschatbrill this would most likely not be the same issue. having multiple email aliases in an account should not require you to get permissions for every individual email. the permissions are at the google account level. the issue the OP is describing (which you're also seeing) is just a display thing; basically to pick an account name, we're pulling the first email address on the account. If that happens to be an alias, that's what is used. There is minor thing we can do which is to make sure we select the main account name (vs. an email alias) for purposes of displaying the account name. As mentioned though, it should only be a display issue and not affect the actual functionality of pulling data.

if you continue to have issues with getting calendar events, we can move this to a new issue and troubleshoot there.