-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Milestone
Description
data login logs you in with a simple experience using your existing social login.
Acceptance criteria
data loginresults in a token in your config file that you can use for further interaction with the API systemdata loginuses an existing social provider (e.g. Google) in browser to do login with a very easy experience
Tasks
- Interaction with conductor to get login url
- Open login url and handle response
- Store token on success
- Retrieve profile
- Handle failure - simple classic try/except in bin/data-login.js (copy data-push.js)
- Help info
-
(More) Tests for this
Analysis
- (with conductor): check authorised, e.g. https://conductor/check?next=http://localhost:5432
- (conductor sends back): nope, here’s the google login url:
- Locally, start an http server listening on port 3000
- Locally, open a browser with that google login URL
- User authenticates with provider (i.e. Google/Github/...)
- If successfull authentication
- gets redirected to http://localhost:3000?jwt=
- Client stores the token and can return instructions to close window (or even just a <script>window.close();</script> response to close the browser window)
- (optional) Client now uses the token to retrieve user profile (name, email etc.)
- Client can now inform the user login was successful and go on with what it wanted to do.
- If unsuccessful
- gets redirected to http://localhost:3000 (no token)
- Client returns a <script>window.close();</script> response to close the browser window
- Client informs the user login had failed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels