Authentication
Minimum Level
User Level
Password Less Auth
import { ReneSDK } from '@reneverse/game-sdk';
const reneSdk = new ReneSDK({
privateKey: '<YOUR PRIVATE KEY>',
apiKey: '<YOUR API KEY>'
});
const main = async () => {
/**
* This basically triggers a request for the user in the app
* ( app.reneverse.io ) to accept the connect for this game.
* This is a passwordless login for the user, where they just put
* in there email and once they accept in the app, the requests gets
* automatically authenticated.
**/
const connectResponse = await reneSdk.connect('<EMAIL OF THE USER>');
/**
* This waits for the user to press the confirm button in the app, and once they
* press it, this becomes true, ideally you would use this to manage user state
* during user's first login
**/
const isConnected = await connectResponse.game.waitForGameConnect();
console.log(isConnected);
}
main()Regular Auth
Last updated

