CodeTriage
CodeTriage copied to clipboard
Account details seemingly not updated properly if github account name and/or email changed while access token is invalid
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)
- Revoke CodeTriage's access from Github
- Change Github username and/or primary email address (maybe need to remove the email address that CodeTriage uses?)
- Re-authorise CodeTriage
- 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
I just want to stop being nagged daily
If you don't click on the links, then emails auto-throttle to once a month: https://github.com/codetriage/CodeTriage/blob/1684bf854b4326ff7b0e5e69a640240b32cde110/app/models/email_rate_limit.rb#L35
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: https://github.com/codetriage/CodeTriage/blob/1684bf854b4326ff7b0e5e69a640240b32cde110/app/services/git_hub_authenticator.rb#L27-L29
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.
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