After another long delay, the seventh commit is up. This is the last of the plumbing commits, and adds OAuth login.
The OAuth authentication is handled by handy-play-oauth, which is about the smallest possible OAuth library. It doesn't itself do user management or any of that. All it does is:
Forward the request to the relevant authentication service (in this case, GitHub's OAuth URL)
Extract the returned OAuth repsonse
Use the authentication token to call the service's REST API to get the user's details
Call whatever action you've configured
In this case, the action I've configured is InterstitialController.onAuth. It either logs you in (if you've already set up your account), or shows an "interstitial" confirmation page if you haven't.
The reason for the confirmation page is that you can attach multiple identities to your account. So before Assessory creates a new account for you, it asks you to confirm that's what you want to do -- in case what you really wanted to do was add the login to an existing account.
(The long delay was me having dinner and getting over a migraine, by the way. Plus staring for far too long at a stupidly trivial bug while my head ached.)
No comments:
Post a Comment