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

File download with query params #246

Closed
jakemauer opened this issue May 16, 2015 · 2 comments
Closed

File download with query params #246

jakemauer opened this issue May 16, 2015 · 2 comments

Comments

@jakemauer
Copy link

Hey there!

We're using Rails as an API backend to an Ember app using token auth. One issue I'm running into is we have a few API endpoints to download a file. Since we're no longer using cookies and since I can't set auth headers for a GET the download gets a big fat 401.

Is it possible to pass the token/email as query params for authenticating certain requests? If that suggestion makes your spidey sense go off, what's a good pattern for this case?

Thank you!

@nicolas-besnard
Copy link
Contributor

You can set auth headers on a GET request
On Sat 16 May 2015 at 10:44 Jake Mauer notifications@github.com wrote:

Hey there!

We're using Rails as an API backend to an Ember app using token auth. One
issue I'm running into is we have a few API endpoints to download a file.
Since we're no longer using cookies and since I can't set auth headers for
a GET the download gets a big fat 401.

Is it possible to pass the token/email as query params for authenticating
certain requests? If that suggestion makes your spidey sense go off, what's
a good pattern for this case?

Thank you!


Reply to this email directly or view it on GitHub
#246.

@jakemauer
Copy link
Author

Well that’s cool, thanks Nicolas! 

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

No branches or pull requests

2 participants