-
Notifications
You must be signed in to change notification settings - Fork 73
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
Token requests fail when using CordovaRequestor if http.setDataSerializer()
is called in app code.
#103
Comments
Can you contribute a PR that retains current functionality and adds this enhancement too? |
mleech
added a commit
to mleech/ionic-appauth
that referenced
this issue
Aug 26, 2022
@mraible I've created PR #142 based on code I've used locally.
This was a change you made to master yesterday. |
I'll get the local file issue fixed in the morning (mountain time). Are you able to get the Angular Cordova demo working on iOS? I was unable to. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had an issue where logins after the first one were hanging - ie
SignInSuccess
never got triggered.It turns out it was because I called
http.setDataSerializer('json')
in my app andCordovaRequestor
needs a serializer type of'utf8'
. The data serializer type is a global setting for some reason, andCordovaRequest
only sets it once in it's constructor. If the value gets changed in app code then subsequent token requests can fail.I've fixed my issue locally by using a customised version of
CordovaRequest
which callshttp.setDataSerializer('utf8')
inside thexhr()
method so that it gets set correctly before each HTTP request.The text was updated successfully, but these errors were encountered: