I cannot generate the account with Enoki. "Invalid client id"
Steps to Reproduce Issue
-
I generate the nonce with this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#create-zklogin-nonce
-
I generate the url as mention here https://docs.sui.io/guides/developer/cryptography/zklogin-integration#get-jwt
-
I'm available to login in google and it redirect correctly with the jwt generated and this Jwt is correct according with the documentation and I decode it, it shows my client id in
audandazpalso has all the required fields -
however if I request this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#create-zklogin-zkp or this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#get-address-for-zklogin-user and I get
invalid_client_id
Expected Result
I shouldn't get any error if I execute the mentioned endpoints
Actual Result
called Result::unwrap() on an Err value: Network("Account request failed with status 400 Bad Request: {"errors":[{"code":"invalid_client_id","message":"Invalid client ID"}]}")
Code
To generate the Oauth url: https://github.com/Singularity-Shift/squad_connect/blob/main/src/service/services.rs#L50
To get the account: https://github.com/Singularity-Shift/squad_connect/blob/main/src/service/services.rs#L182
To get the zk proof: https://github.com/Singularity-Shift/squad_connect/blob/main/src/service/services.rs#L129C14-L129C22
However I try to send directly the request by curl and the same issue
System Information
- OS: Manjaro Linux
- Compiler: cargo and rustc 1.85.0
Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links!
The issue is resolved, just I needed to add the google client id to my Enoki app account, however with the response data of this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#get-address-for-zklogin-user if it is possible to create the SuiWallet object or do I need to call for it this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#create-zklogin-zkp
The issue is resolved, just I needed to add the google client id to my Enoki app account, however with the response data of this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#get-address-for-zklogin-user if it is possible to create the SuiWallet object or do I need to call for it this endpoint https://docs.enoki.mystenlabs.com/http-api/openapi#create-zklogin-zkp
You can derive the wallet simply from the get-address call without requesting a proof but if you want your user to be able to sign transactions, they will need the zkp as well.