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

How to set withCredentials = true options. #80

Open
tom-turner opened this issue Apr 16, 2022 · 3 comments
Open

How to set withCredentials = true options. #80

tom-turner opened this issue Apr 16, 2022 · 3 comments
Labels
question Further information is requested

Comments

@tom-turner
Copy link

Hey!

I could not figure out how to set headers to include credentials on the request. How is this done?

Thanks,
Tom.

@davekiss
Copy link
Contributor

@tom-turner we don't currently have a way to set withCredentials in this library. Note that this is different from setting the headers, which this library does support.

Can you tell me a bit more about your use case? If it's an obvious missing feature, I could probably whip up a PR to implement this functionality pretty quickly.

@davekiss davekiss added the question Further information is requested label Apr 17, 2022
@tom-turner
Copy link
Author

tom-turner commented Apr 21, 2022

Hey! sorry for my late reply.

I'm was hoping to use httpOnly cookies for user auth and i would like these to be included in the request to the server. I don't think setting my own headers is an option as i cant access the cookie from the client side. Would be amazing if there was a way to include credentials on the request.

Many thanks!
Tom.

@wyxos
Copy link

wyxos commented May 22, 2022

@tom-turner Is your use case an attempt to link a frontend UI to Laravel back-end? I was wondering if it had anything to do with this too as the request performed by the plugin keeps giving me 419 which I suspect is relative to the above missing configuration.

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

No branches or pull requests

3 participants