In version 1.0.4, can we now login to the wallet without a QR code?
No, I using the 1.0.4 and I cant
Only in iOS and Android.
For desktop you will always use QR Code.
For WebGL you still need the QR Code. However I am working on an update to replace Wallet Connect in WebGL with a direct interface to Metamask so that WebGL with interact with Metamask as browser apps do.
Amazing! My team needs WebGL - Wallet connection for further development. We canāt wait for this great update!
WebGL currently does have a wallet connection - just the Wallet connect QR code one. The Metamask Interface should be ready by the end of the month.
@dgoodrich Iāll update to 1.0.4 and test. Making this a UPM package will mean that all external dependencies such as UniTask can be downloaded separately.
References:
GitHub issue: https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate/issues/42
Has MoralisInterface.cs
been moved to the top level of the directory?
Anyway nothing has changed, I still get this error when I use a different app to access a Cloud Function on my Moralis Server instance:
2022-02-11T09:45:47.880Z - Error: Invalid session token
at Object.getAuthForSessionToken (/moralis-server/lib/Auth.js:114:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Iām also still getting a NullReferenceException
when I try to log out, both manually and when it is triggered through Application.quitting
.
Long back I was able to use the API Console for a specific user but nowadays it doesnāt work either.
This old error did not appear in one project but appeared in another even when both are using .NET Standard 2.0:
D:\dev\Banzan\UltraCore\MoralisWeb3ApiSdk\Moralis\Moralis.WebGL\Moralis.SolanaApi\Client\ApiClient.cs(154,20): error CS0103: The name 'HttpUtility' does not exist in the current context
Also, have you posted the cloud function question and code in a forum channel for cloud functions?
No, not yet Iām afraid. I decidedly stuck here since I was usually using Unity for this, and because I suspect itās not a problem with Cloud Functions.
Iāll confirm with my boss just to be sure. Please send me your GitHub/GitLab email address privately.
@nasirs, @SamR, @vivraan, @cuongnm, @jlourie, @YosephKS, @enoonmai, @K00N
I had to release a critical update this afternoon. Authentication now requires server Time be included in the message being signed.
The change was made in the MainMenuScript.cs file of the Demo
public async void WalletConnectHandler(WCSessionData data)
{
Debug.Log("Wallet connection received");
// Extract wallet address from the Wallet Connect Session data object.
string address = data.accounts[0].ToLower();
string appId = MoralisInterface.GetClient().ApplicationId;
long serverTime = 0;
// Retrieve server time from Moralis Server for message signature
Dictionary<string, object> serverTimeResponse = await MoralisInterface.GetClient().Cloud.RunAsync<Dictionary<string, object>>("getServerTime", new Dictionary<string, object>());
if (serverTimeResponse == null || !serverTimeResponse.ContainsKey("dateTime") ||
!long.TryParse(serverTimeResponse["dateTime"].ToString(), out serverTime))
{
Debug.Log("Failed to retrieve server time from Moralis Server!");
}
Debug.Log($"Sending sign request for {address} ...");
string signMessage = $"Moralis Authentication\n\nId: {appId}:{serverTime}";
string response = await walletConnect.Session.EthPersonalSign(address, signMessage);
Debug.Log($"Signature {response} for {address} was returned.");
// Create moralis auth data from message signing response.
Dictionary<string, object> authData = new Dictionary<string, object> { { "id", address }, { "signature", response }, { "data", signMessage } };
Debug.Log("Logging in user.");
// Attempt to login user.
MoralisUser user = await MoralisInterface.LogInAsync(authData);
if (user != null)
{
Debug.Log($"User {user.username} logged in successfully. ");
}
else
{
Debug.Log("User login failed.");
}
HideWalletSelection();
}
The newest release (v1.0.5) has this patch.
Ah shucks, need to do the whole update process again š„²
Why not just that block of code?
Is it just that code thatās changed? Well in that case, sure!
That is it, added code to retrieve the server time and add it to the message being signed. No other changes needed.
i receive UriFormatException from version 1.05 when login using walletconnect via WebGl. version 1.04 working fine. pls help tq
Hi @enoonmai. I am having the same problem as it was saving my class ACL as āMaster Key Onlyā I set my PublicReadAccess = true and PublicWriteAccess, but I was still getting āMaster Key Onlyā. Have you figured out the solution for this?
Hi, thanks for your solution, I able to run photon 2 in WebGL. but i have problem with player swapping controller. when one player in the room, the playercontroller is working, but when second player join the room, the player 1 control player 2 while player 2 control player 1. Do u hav the same problem? TQ
You have to verify the authority of the player
Use photonView.isMine to do this
If true, you can use and move the player
If false, you canāt
This is the basic logic for multiplayer