Email and password
Authentication Methods
1. Email and Password Authentication
import { MoonSDK } from '@moonup/moon-sdk';
const moonSDK = new MoonSDK(config);
async function signUpWithEmailAndPassword(email, password) {
try {
await moonSDK.signUp(email, password);
console.log('Account created successfully.');
} catch (error) {
console.error('Error creating account:', error);
}
}
async function signInWithEmailAndPassword(email, password) {
try {
await moonSDK.signInWithPassword(email, password);
console.log('Signed in successfully.');
} catch (error) {
console.error('Error signing in:', error);
}
}2. Phone Number Authentication
Last updated