Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Basic flow #2

Open
lucasdf opened this issue Nov 23, 2019 · 3 comments
Open

Basic flow #2

lucasdf opened this issue Nov 23, 2019 · 3 comments

Comments

@lucasdf
Copy link
Member

lucasdf commented Nov 23, 2019

  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
Copy link
Member Author

lucasdf commented Nov 23, 2019

@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
Copy link
Member

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
Copy link
Member Author

lucasdf commented Nov 23, 2019

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

about using pathom, that sounds fun 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants