-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bug: Usinh Capacitor HTTP to send url form encoded POST requests does not work #6368
Comments
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
This comment was marked as abuse.
This comment was marked as abuse.
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
Does "needs reproduction" involve me reproducing it, or you're labeling this as "we as the developers of the framework need to reproduce this issue first" ? |
@MGX-CODING I think you need to provide a reproduction. If you can pare it down to use some commonly available API like this one https://jsonplaceholder.typicode.com/ it'd help even more. |
This comment was marked as abuse.
This comment was marked as abuse.
@jrobeson considering the cold shoulder I've been given (marking my comment as abusive and letting me intercat only with a chatbot), I decided to simply give up on this issue. I knew that Capacitor was terrible, now I know why, it simply reflects the personnality of their developers (not all of them I still hope though). To resolve the issue, I asked for a CORS activation on the server, which took 3 weeks and had major side effects on other applications (huge enterprise). But now it's done, and I don't need to use this cursed package anymore. And to answer you directly, there is already multiple examples online of the issue, I linked 2 of them already and @nhh just gave a third one. Choosing to just ignore them is either laziness or pettiness. Taking all of that into account, if anyone encounters the issue, I would suggest them to find any workaround around it, rather than hoping for a resolution. That's my little bit of advice, hope it will serve one well ! |
Sorry, I missed the comment with the question because I unsubscribed from the issue after you pinged me. As jrobeson has mentioned, you (the reporter) have to provide a sample app where the issue can be reproduced. If the reporter can't provide a sample app, anyone else facing the issue can comment with a sample app, but none did so far, as nhh's comment also brings a http plugin issue without sample app. He took the opportunity to downvote jrobeson's comment where he answered the question I didn't answer. That's also not cool. We require full sample apps (zip or github repository) for being able to reproduce, even for paying customers. If we can't reproduce an issue, we can't fix it. I know http issues are specially tricky as they involve a server, but it's not impossible. I'm locking the issue, if any of the people who has commented can provide a sample app they can edit their comment. |
Closing since no sample app was provided |
Bug Report
Capacitor Version
Platform(s)
Android
Current Behavior
I am trying to use OAuth2 alongside Capacitor.
Everything works well on browser. On mobile, I need to use Capacitor HTTP plugin to bypass the CORS errors associated with my auth server (can't change that, not the point).
After hours of trying to find the issue, I stumbled across this : capacitor-community/http#270
And it seems to match my issue : when using capacitor HTTP plugin, url form encoded parameters are not being used correctly.
As explained, it works well on browser, but on Android, it's impossible to make it work.
I tried calling manually
fetch
with different bodies, but the issue is still the same : my server does not recognize the body, saying I have not provided theGrant type
parameter, even when I have done it :For reference, I am using this library : https://github.com/manfredsteyer/angular-oauth2-oidc
With the authorization_code workflow without PKCE (again, can't change that, not the point)
Expected Behavior
I would like for it to work out of the box.
I don't mind using a hack, a workaround, or anything of that flavor. I just want it to work. If you have any leads on why it happens, or how to bypass it, I'm all ears !
Code Reproduction
I'm sorry the environment to reproduce this is too complex. Maybe try making a simple HTTP server that accepts a form encoded request ?
Other Technical Details
npm --version
output: 8.19.2node --version
output: v18.10.0pod --version
output (iOS issues only):Additional Context
capacitor-community/http#270
capacitor-community/http#12
The text was updated successfully, but these errors were encountered: