weaveworks / service

☁️ Images for Weave Cloud (R) (TM) (C) ☁️
https://cloud.weave.works
2 stars 2 forks source link

users: Fix github key uploading #2742

Closed ozamosi closed 2 years ago

ozamosi commented 2 years ago

As a user who had previously authorized github outside auth0, calling GetAccessToken against auth0 obviously doesn't work if my user doesn't exist in auth0 yet - and if the user exist, we might not actually find the auth0 version of the login first.

Instead, look for clear traces of auth0-iness, and only return those keys. This will force a re-authentication, which I'm OK with given it's how to create my login in our central login service. In fact, I'm pretty sure it won't actually require any user action once we're using the same github application as before.