Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account details seemingly not updated properly if github account name and/or email changed while access token is invalid #1593

Open
Tabby opened this issue Nov 24, 2021 · 2 comments

Comments

@Tabby
Copy link

Tabby commented Nov 24, 2021

I revoked CodeTriage's access to github years ago after getting fed up of being nagged for not working on things every week. Eventually I got fed up of being nagged about CodeTriage not having access so I re-authorised. Then when it started nagging me about not doing enough coding again I remembered why I'd revoked it so I deleted my account

However, I'm still getting emails about my access token having been revoked. I notice though that they use my old Github username (changed about 3 years ago), and my old github email address.

I assume then, that somehow CodeTriage has created a new account or something when I reauthorised due to the changed username, instead of updating the existing details, such that while the new account has been deleted, the old one has not been.

Expected Behavior

  • When I delete my account I should not still receive daily emails about either my access token being invalid, or about not working on any issues
  • When re-authorising after changing account details in Github, account details in CodeTriage should be updated

Current Behavior

  • Seems like if an account's access token is revoked, if github account details have changed they are not correctly updated when access is re-granted
  • Neverending emails. Oh good gods so many emails. MAKE THEM STOP!!! 😭

Possible Solution

Steps to Reproduce (for bugs)

  1. Revoke CodeTriage's access from Github
  2. Change Github username and/or primary email address (maybe need to remove the email address that CodeTriage uses?)
  3. Re-authorise CodeTriage
  4. Continue to receive emails to old name at old email address about access token having been revoked

Context

I just want to stop being nagged daily (without simply forwarding everything from CodeTriage to /dev/null in case I use it again in future), for the love of all that's good in this world!

Your Environment

  • Version used: N/A
  • Browser Name and version: N/A
  • Operating System and version (desktop or mobile): N/A
  • Link to your project: N/A
@schneems
Copy link
Member

schneems commented Feb 7, 2023

I just want to stop being nagged daily

If you don't click on the links, then emails auto-throttle to once a month:

when "once_a_month"

Ahh, you're talking about the token warning. That's a special case.

Unfortunately I can't delete what I can't find. I don't have either your old username or email in this thread.

Using your info from your public github profile I definitely don't see your current info:

~ $ rails c
[Scout] [02/07/23 21:42:05 +0000 run.5735 (7)] INFO : Scout Agent [5.3.1] Initialized
[Scout] [02/07/23 21:42:05 +0000 run.5735 (7)] INFO : Not Loading Instruments
[Scout] [02/07/23 21:42:05 +0000 run.5735 (7)] INFO : Scout Agent [5.3.1] Installed
[Scout] [02/07/23 21:42:05 +0000 run.5735 (7)] INFO : Monitoring isn't enabled for the [production] environment.
[Scout] [02/07/23 21:42:05 +0000 run.5735 (7)] INFO : Agent attempting to load in interactive mode.
[Scout] [02/07/23 21:42:05 +0000 run.5735 (7)] INFO : Deferring agent start. Standing by for first request
W, [2023-02-07T21:42:05.613188 #7]  WARN -- Skylight: Activating Skylight for Background Jobs because SKYLIGHT_ENABLE_SIDEKIQ is set
I, [2023-02-07T21:42:05.840826 #7]  INFO -- : [SKYLIGHT] [5.3.4] Skylight agent enabled
I, [2023-02-07T21:42:05.843590 #7]  INFO -- : [RailsAutoscale] Preparing request middleware
I, [2023-02-07T21:42:05.921365 #7]  INFO -- : Raven 2.13.0 ready to catch errors
I, [2023-02-07T21:42:07.015878 #7]  INFO -- : [RailsAutoscale] Reporter not started: no metrics need to be collected on this dyno
D, [2023-02-07T21:42:07.115923 #7] DEBUG -- :   ActiveRecord::SchemaMigration Pluck (1.3ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
I, [2023-02-07T21:42:07.116231 #7]  INFO -- : Using schema cache file /app/db/schema_cache.yml
Loading production environment (Rails 7.0.4)
irb(main):001:0> User.where(github: "Tabby").first
D, [2023-02-07T21:42:18.624272 #7] DEBUG -- :   User Load (2.1ms)  SELECT "users".* FROM "users" WHERE "users"."github" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["github", "Tabby"], ["LIMIT", 1]]
=> nil
irb(main):002:0> User.where(github: "tabby").first
D, [2023-02-07T21:42:22.637492 #7] DEBUG -- :   User Load (1.6ms)  SELECT "users".* FROM "users" WHERE "users"."github" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["github", "tabby"], ["LIMIT", 1]]
=> nil
irb(main):003:0> User.where(email: "t<redacted>y@b<redacted>n.online").first
D, [2023-02-07T21:42:40.034092 #7] DEBUG -- :   User Load (2.0ms)  SELECT "users".* FROM "users" WHERE "users"."email" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["email", "t<redacted>y@b<redacted>n.online"], ["LIMIT", 1]]
=> nil

That's also probably why you can't log in. Did you change your name and/or email on GitHub? If so you can see how we find you here:

current_user ||
User.find_by(github: auth.info.nickname) ||
User.find_by(email: auth_email)

I notice though that they use my old Github username (changed about 3 years ago)

Gotcha.

Update one of those on your github profile to the username or email (they should be in the codetriage emails). Once you do that you can log back in to CodeTriage and delete your account. Account deletions are hard deletes of all associated user data.

@Tabby
Copy link
Author

Tabby commented Feb 15, 2023

Yeah, I did change my username on Github. I think I changed my email at the same time actually, on reflection. Which is an awkward thing to do, I'll grant you, but it's rare to find a service where you can't unsubscribe from emails without logging in first.

I figured it was likely that one of those was used to find a profile assuming it wouldn't change, and that the fix would ideally be to use the Github account ID (retrievable from the API using a username) rather than using the username itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants