-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Client management screen #4177
Comments
@ErisDS @sebgie Is this the same as, or separate to the previous idea of "accounts" that we've been over. I think it might be different? Example 1 (account): I want to be able to auto-tweet when I publish a post. So I click a button and connect my twitter account to Ghost. Ghost now appears on the "apps" screen in twitter, and Ghost is authorised to post to my twitter stream via API. Example 2 (this issue): I want to use a desktop editor to publish to my Ghost blog. I click a button in the desktop editor and connect Ghost to my editor. The editor now appears on "this screen" in Ghost, and the editor is authorised to publish to my blog. These things are the same but different - right? My question is this: Is this 1 feature with a 2 way auth path? Or are these 2 feautures which live in different places and need different names? I feel like it should be the first, but I'm not sure. |
From my perspective theses are two different features. They both use the same authentication technology but offer different functionality for the user. For the
|
Sketch3 file - http://cl.ly/aY7e |
Hi all, @ErisDS and @taras have been talking over email about me taking on this feature. I am going to start to dig deeper and maybe start working on this feature. @JohnONolan is the Sketch3 file above the final design? |
Hi @zinyando, and welcome 😊 As I mentioned to @taras, this needs a much clearer, slightly paired-back spec for a first version . There's also not an API endpoint to work from as yet so you'll need to work from dummy data. I'll post a new spec here towards the end of this week, hopefully in the meantime there's enough digging around to do looking at things like the labs flag system, as this feature will need to live behind the 'public API' flag for the time being. |
@zinyando below is the spec for a first version. Probably need to play it a bit fast and loose with the finer details, but the core functionality should be correct. Client management v1Whenever Public API is enabled in labs, we need to show a new settings screen called 'connections' in the left hand Ghost menu. There is an Client listingsThis screen is roughly what's shown in #4177 (comment), but for now, this screen will only list clients, as there are no accounts yet. The API for clients only has a read endpoint at the moment. The issue #4175 covers adding the endpoints for browsing, editing, adding, etc. Clients will be fetched from the Edit functionsFor each client, we need two buttons: one to enable/disable and one to refresh the client secret. Enable/disable will be sending an edit (PUT) request to change the The Clicking on a client should take the user to a screen where the general values for that client can be edited. The two Adding new clientsAs with other screens in the admin (tags, team, etc) there should be a green button in the top right corner to add a new client. This should include the ability to set a name, a description, a logo, and one or more trusted domains. The slug/id will be generated from the name and the secret ought also to be auto-generated server-side. The Whenever a custom client is edited, the same fields should be editable, including the ability to add/remove trusted domains. I think, the adding and removing of multiple trusted domains will be the trickiest part from an ember perspective. I think the UI should, for now, borrow heavily from the navigation screen. A trusted domain is just a domain, e.g. The api calls for adding/removing a trusted domain is very much up for discussion. I'm not sure what the most natural way to do it is from the ember perspective? Hopefully this is enough information to get started. Happy to clarify anything 😄 |
@ErisDS as we're preparing to add trusted domains interface, it became apparent that we don't really understand what it does. Can you describe what a trusted domain is? and how it's used? |
Clients are things which are allowed to access the API. Trusted domains are the domains (urls) from which these clients are allowed to make requests. All clients automatically get granted permission to make requests from the domain set as the url in config.js, but it's quite common to want to make requests from other domains as well. The most obvious example is that on blog.ghost.org, we have ghost.org as a trusted domain for the Trusted domains are linked to clients through the client_trusted_domains table/model/etc. A trusted domain is therefore made up of just a client_id and a domain. A domain in this case is the hostname part of a URL, so "ghost.org" not "http://ghost.org/" etc. |
Perfect. Thank you |
I'm closing all OAuth and most API issues temporarily with the RE: OAuth, for the next 2-3 months we'll be implementing an official Ghost OAuth login system, providing global access to all Ghost blogs with a single login. We'll be opening issues around this system soon, and I don't want to cause confusion with OAuth for the API. JSON API Overhaul & OAuth access are currently scheduled next on the roadmap |
This belongs to the OAuth Epic: #4004 - please read this for the big picture of what this issue is for :)
To allow a user to manage the available clients it is necessary to provide a new screen (probably
/settings/clients
) that adds the following functionality:client_id
client_secret
The client management interface will need some design guidance from @JohnONolan. Examples can be found here:
The text was updated successfully, but these errors were encountered: