Authentication
Authentication in the @espressif/rainmaker-base-sdk handles user signup and login operations. This includes registration, password-based login, OTP-based login, and OAuth-based login. For more information about ESP RainMaker, see the Introduction to ESP RainMaker.
Get Auth Instance
ESPRMBase, configured in Setting up the SDK step, provides an instance of the ESPRMAuth class through getAuthInstance method, used to handle operations related to user authentication, including login, signup, forgot password, and more.
try {
const authInstance = ESPRMBase.getAuthInstance();
// Use authInstance for authentication operations
} catch (error) {
console.error("Error retrieving auth instance:", error);
}