Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define how to gain access to real openwhyd data from the react app? #5

Open
adrienjoly opened this issue Jul 21, 2017 · 9 comments
Open

Comments

@adrienjoly
Copy link
Member

possibilities:

  • cross-subdomain cookie,
  • mirroring script,
  • jwt.io,
  • oauth api...
@adrienjoly adrienjoly created this issue from a note in Development (Inbox / ideas) Jul 21, 2017
@mauricesvay
Copy link
Member

oAuth sounds like a good idea.

@adrienjoly
Copy link
Member Author

adrienjoly commented Nov 5, 2017

Thanks for sharing your recommendation, @mauricesvay!

Have you ever added oAuth to a back-end server? Or do you know anyone who would be willing to help us doing this?

For reference, this issue is connected to openwhyd/openwhyd#55

@adrienjoly
Copy link
Member Author

Also, I'm guessing that using oAuth means that we need to modify the code of all our existing API endpoints, so that they accept tokens additionally to cookies. 😰

I'd be really interested in reading about auth solutions (or patterns) that would have a minimal impact on the code of existing API endpoints.

@mauricesvay
Copy link
Member

I'm sorry, but I don't have much experience on the backend. I've only implemented oAuth2 clients.
I guess you could write a middleware for API endpoints that checks for oAuth2 tokens.

@adrienjoly
Copy link
Member Author

Yes, I can imagine a proxy bound to api.openwhyd.org, that would handle OAuth and wrap existing API endpoints from openwhyd.org by turning OAuth session into Cookie sessions.

Not a perfect solution, but would prevent causing bugs on openwhyd.org, while enabling and experimenting OAuth quickly, imo.

@SkinyMonkey
Copy link
Contributor

A proxy solution sounds better.

I'll tinker that this afternoon i think :)

@adrienjoly
Copy link
Member Author

@SkinyMonkey I believe that you have a working node.js client for Openwhyd's current back-end. Would you mind sharing a URL to its code here?

@adrienjoly
Copy link
Member Author

Reminder: until we setup something like OAuth, it's still possible to fetch playlists from any domain, using our public JSON API.

@adrienjoly
Copy link
Member Author

Also, see openwhyd/openwhyd#194 for more info about using react to build a mobile app, or responsive web app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development
  
Backlog / ToDo Next
Development

No branches or pull requests

3 participants