-
Notifications
You must be signed in to change notification settings - Fork 22
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
Unable to use token auth in Unity app #1292
Comments
I would recommend using |
Thanks for the reply, even though this is somewhat cumbersome in Unity since I can't use the native UnityWebRequests in that context (they only work on the main thread 🤷). Using a httpClient and obtaining what seems like a proper auth token request:
(I truncated the data just to be sure) But when I return that from the authCallback I still get the same error message, and to me the timestamp value seems fine...? |
Can you try lower versions of |
When I downgrade to 1.2.14 I get another error:
I am using Nuget for Unity by the way, I need it for some other packages as well and it is very convenient. I assume the unitypackage is just the dll's packaged with the dependencies, right? Edit: 1.2.13 returns the same error as 1.2.14 |
I wouldn't recommend using that one. We have official instructions to include |
As expected, installing the package yields the exact same errors |
Can you try 1.2.8 or 1.2.9 |
Sure, downgraded to the 1.2.8 package and that gives me the same error as the 1.2.15 package gave me:
(at this point I start questioning myself a little, that truncated response above looks correct, right?) |
Also, I'd like to point out that the Unity version works just fine when using the API key (both nuget and package versions) |
Okay, you try using API_KEY for now, with latest version. We will see and check if we can fix the issue in near future 👍 |
I've implemented a token endpoint which is working as expected from the js sdk, but when I try to use it from the dotnet/unity sdk like this:
I am unable to connect and always get the unhelpful error message:
Using the API key directly works, but as you've stated yourself in this article, it is a really bad idea to embed the api key in the app. How can I fix this?
Tested in both Unity 2022.3.42f and Unity 6000.0.23f, Ably sdk 1.2.15
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: