Search code examples
nearprotocol

User "signing in" without specifying Contract ID


Is it possible to sign in a user without specifying a contract?

From docs

const signIn = () => {
  wallet.requestSignIn(
    "example-contract.testnet",     // contract requesting access --> Not include this
    "Example App",                  // optional
    "http://YOUR-URL.com/success",  // optional
    "http://YOUR-URL.com/failure"   // optional
    );
};

Solution

  • I think if you skip this then near-api-js will create a FullAccess key which is how NEAR CLI handles the near login command