-
Notifications
You must be signed in to change notification settings - Fork 0
OAuth Design
Rohan Nagar edited this page Sep 1, 2017
·
4 revisions
When a user is adding a service to their account for the first time, this is the flow that needs to happen.
- The user taps on the service they want to add.
- Pilot sees which service the user wants to add, and makes a network request to Lightning at the URL path
/{service}/oauthUrl. - Pilot gets the OAuth URL from Lightning's response, and opens the URL for the user to see in a browser (either in-app or in Safari).
- The user authenticates Pilot on the service's website.
- The service makes a network call to the provided callback URL (this is set up either on the service's app page or in the OAuth URL from Lightning). This callback URL should be the Pilot app.
- With the user's auth tokens that Pilot gets from the callback, Pilot updates the user account in Thunder with the new OAuth keys.
- Pilot waits for a success from Thunder - on success, the user is taken back to the home screen with the new service enabled.
