{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/fxa-oauth-server/issues/196","labels_url":"https://api.github.com/repos/mozilla/fxa-oauth-server/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/fxa-oauth-server/issues/196/comments","events_url":"https://api.github.com/repos/mozilla/fxa-oauth-server/issues/196/events","html_url":"https://github.com/mozilla/fxa-oauth-server/issues/196","id":54410482,"number":196,"title":"Add \"owners\" to OAuth Clients","user":{"login":"vladikoff","id":128755,"avatar_url":"https://avatars.githubusercontent.com/u/128755?v=3","gravatar_id":"","url":"https://api.github.com/users/vladikoff","html_url":"https://github.com/vladikoff","followers_url":"https://api.github.com/users/vladikoff/followers","following_url":"https://api.github.com/users/vladikoff/following{/other_user}","gists_url":"https://api.github.com/users/vladikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/vladikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladikoff/subscriptions","organizations_url":"https://api.github.com/users/vladikoff/orgs","repos_url":"https://api.github.com/users/vladikoff/repos","events_url":"https://api.github.com/users/vladikoff/events{/privacy}","received_events_url":"https://api.github.com/users/vladikoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-15T04:07:29Z","updated_at":"2015-01-22T19:55:19Z","closed_at":null,"body":"Hey @rfk, @seanmonstar, I'm planning a PR to add \"owners\" to OAuth Clients.\r\n\r\n\r\n******\r\n![image](https://cloud.githubusercontent.com/assets/128755/5752381/ea67e93c-9c41-11e4-8e47-480f6e0a8017.png)\r\n>  Figure 1: Creating a new client, adding an extra owner to that client\r\n\r\n******\r\n\r\nThis will probably involve creating the following:\r\n* a new table `client-owners`. such as \r\n```\r\n *   clientDevelopers: {\r\n *     <id>: {\r\n *       clientId: <client_id>,\r\n *       userId: <user_id>\r\n *     }\r\n *   }\r\n```\r\n* a new endpoint to add additional client owners ( i.e `/client-owners`) (Should this take UID as a parameter or something else?)\r\n* changes to `/clients` API, such as only those with owner permissions can modify the client.\r\n\r\nAm I forgetting anything or are there any issues with this approach? I appreciate your input and suggestions for this feature!  :book: "},"comment":{"url":"https://api.github.com/repos/mozilla/fxa-oauth-server/issues/comments/71087092","html_url":"https://github.com/mozilla/fxa-oauth-server/issues/196#issuecomment-71087092","issue_url":"https://api.github.com/repos/mozilla/fxa-oauth-server/issues/196","id":71087092,"user":{"login":"seanmonstar","id":51479,"avatar_url":"https://avatars.githubusercontent.com/u/51479?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmonstar","html_url":"https://github.com/seanmonstar","followers_url":"https://api.github.com/users/seanmonstar/followers","following_url":"https://api.github.com/users/seanmonstar/following{/other_user}","gists_url":"https://api.github.com/users/seanmonstar/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmonstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmonstar/subscriptions","organizations_url":"https://api.github.com/users/seanmonstar/orgs","repos_url":"https://api.github.com/users/seanmonstar/repos","events_url":"https://api.github.com/users/seanmonstar/events{/privacy}","received_events_url":"https://api.github.com/users/seanmonstar/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T19:55:19Z","updated_at":"2015-01-22T19:55:19Z","body":"This is true. Though, the best that can be done is perhaps to query the tokens for a uid, order by created_at, descending. This will get you the most recent email used.\r\n\r\nThe profile server, when asked for an email for a token, it just asks the OAuth server for the email, and is returned the email in that db column.\r\n\r\nThe real fix eventually would require receiving events from the fxa-auth-server when the user has changed their email."}}