-
Notifications
You must be signed in to change notification settings - Fork 26
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 based authentication always results in 40101 Request mac does not match #1093
Comments
Hello @Yoshi2889. The library is failing with "Request mac does not match" because the auth response is returning an invalid
Maybe the |
Thanks for your reply. I edited those values out for this report as I did not want to leak any information or keys, they are present however in the actual output. As I mentioned this setup does work in conjunction with the TypeScript library so this leads me to believe this is an issue with the Cocoa library specifically. |
@Yoshi2889 I see, thanks for clarifying. I'll try to reproduce the issue. |
I did some further testing and the Android or Java library works fine as well with the unchanged authentication server I posted. I have still been unable to get the Cocoa library working with token based authentication. |
@Yoshi2889 Thank you for your inputs. We already found the issue. It will be fixed in the next version. |
Which version of the Ably SDK are you using?
1.2.3
On which platform does the issue happen?
iOS 14, iPadOS 14, macOS 11
Are you using Carthage?
No.
Are you using Cocoapods?
Yes, 1.10.0
Which version of Xcode are you using?
Xcode 12.2
Build version 12B45b
What did you do?
Trying to use token based authentication with a simple local authentication server does not work. The following code is used to generate a TokenRequest on the server side using the PHP library. I've attempted to disable some of the parameters passed to the TokenRequest object, like disabling the capabilities, but to no avail.
On the Cocoa side, I use this code to set up token authentication:
The request goes through fine to the authentication server and the server returns a seemingly valid TokenRequest.
I then instantiate an ARTRealtime instance with the
autoConnect
option turned off and call itsconnect()
method later.What did you expect to happen?
The token request is used to authenticate to Ably, successfully. The same authentication server works successfully with the Ably JavaScript SDK, which leads me to believe the Cocoa library has a fault.
What happened instead?
An exception is thrown with the description
Error 40101 - Request mac does not match (reason: (null))
I stripped the TokenRequests and IDs from the following logs. If wanted I can send samples of those somewhere private.
Link to sample project
This is a private project, so I don't have a sample project.
┆Issue is synchronized with this Jira Bug by Unito
The text was updated successfully, but these errors were encountered: