parenthesin / simul

GraphQL BFF for our live demo Web App
Eclipse Public License 2.0
0 stars 0 forks source link

Basic flow #2

Open lucasdf opened 4 years ago

lucasdf commented 4 years ago
  1. User goes to frontendapplication.com/login
  2. User clicks on Login with Unsplash button
  3. We redirect the user to https://unsplash.com/oauth/authorize, as documented in https://unsplash.com/documentation#authorization-workflow
  4. After user confirms the login, Unsplash will make a get to simul.com/redirect_uri containing a query parameter code.
  5. simul makes a request to https://unsplash.com/oauth/token in order to retrieve the access-token
  6. Once we have the access-token, we can consider the user authenticated and make requests to Unsplash using this token.
lucasdf commented 4 years ago

@rafaeldelboni wdyt? I guess we can think about other things too, like using a local db in simul to cache some data or something like that

rafaeldelboni commented 4 years ago

Yes, I agree we could have a cache and the flow looks good to me.

I would just add a splashed in the URL routes (like simul.com/splashed/redirect_uri) because we will have probably more services like this in the simul.

I was planning to use pathom and create resolvers for the splashed api, wdyt about it? Do you this is a over kill? I thought it would help developing the frontend case we decide to use fulcro.

lucasdf commented 4 years ago

yes, that's a great idea. so we can reuse this for other projects.

about using pathom, that sounds fun :+1: