-
Notifications
You must be signed in to change notification settings - Fork 27
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
A token request is rejected with a 40144 error when an authorization header is present in auth_headers #577
Comments
Thanks for raising @mclark-ably. A couple of questions:
|
|
Hey @mclark-ably, could you please share the code snippet for both the |
You can try the same from the following code:
and client(using any random JWT)
As said it appears the header to authenticate to the auth server is also send to the requestToken endpoint |
Steps to reproduce:
auth_url
and have the auth_url require authentication. Return aTokenRequest
via the endpoint withauth.create_token_request
auth_url
andauth_headers
in its client optionsExpected Result:
The authorization header is used to authenticate the client to the
auth_url
and the subsequent request from the client to get a token from the request token endpoint is successful.As per the spec item TO3j8 and Ably docs the headers should be used in requests to the auth_url which implies that they shouldn't be sent in the token request to Ably.
Including an authorization header in
authHeaders
in ably-js for this scenario worksActual result:
The request is rejected by realtime and the client goes to the disconnected state
Workarounds:
auth_callback
instead ofauth_url
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: