Skip to main content

Getting Started

Creating your host account on AndanDo is quick and straightforward. This guide walks you through the registration process and initial account setup.
All hosts start with the same registration process. Once your account is created, you’ll have access to the host dashboard where you can create and manage your tours.

Registration Process

Step 1: Access the Registration Page

Navigate to the registration page at /authentication/register. You’ll see a clean, centered form ready for your information.
If you already have an account, click the “Inicia sesion” (Sign in) link at the top of the registration form to go directly to the login page.

Step 2: Complete the Registration Form

The registration form collects essential information to create your host profile:
1

Basic Information

Required Fields:
  • Nombre (First Name): Your given name
  • Email: Your email address (must be unique and valid)
  • Confirmar Email: Re-enter your email to confirm
  • Contrasena (Password): At least 6 characters
  • Confirmar contrasena: Re-enter your password to confirm
Components/Pages/Register_Account.razor
[Required(ErrorMessage = "Ingresa tu nombre.")]
public string Nombre { get; set; } = string.Empty;

[Required(ErrorMessage = "Ingresa tu email.")]
[EmailAddress(ErrorMessage = "Email invalido.")]
public string Email { get; set; } = string.Empty;

[Required(ErrorMessage = "Ingresa tu contrasena.")]
[MinLength(6, ErrorMessage = "La contrasena debe tener al menos 6 caracteres.")]
public string Password { get; set; } = string.Empty;
2

Optional Details

Optional but Recommended:
  • Apellido (Last Name): Your family name
  • Pais (Country): Select from a dropdown of 195+ countries
  • Ciudad (City): Your city or location
  • Telefono (Phone): Your contact number
  • URL Imagen Perfil (Profile Photo URL): Link to your profile picture
Providing complete information helps build trust with potential customers and improves your profile’s professionalism.
3

Submit Registration

Click the “Registrar” button to submit your registration. A loading modal will appear while your account is being created.
Components/Pages/Register_Account.razor
@if (_isSubmitting)
{
    <div class="registration-modal-backdrop">
        <div class="registration-modal">
            <div class="spinner"></div>
            <div class="text-16 fw-600 mt-15">Registrando tu cuenta...</div>
            <div class="text-13 text-dark-1 mt-5">Esto puede tardar unos segundos.</div>
        </div>
    </div>
}

Form Validation

The registration form includes comprehensive validation to ensure data quality:
  • Must be a valid email format
  • Must match the confirmation email
  • Must be unique (not already registered)
[EmailAddress(ErrorMessage = "Email invalido.")]
[Compare(nameof(Email), ErrorMessage = "Los correos no coinciden.")]
public string ConfirmEmail { get; set; } = string.Empty;
  • Minimum 6 characters
  • Must match the confirmation password
  • Hashed using PBKDF2 with SHA256
[MinLength(6, ErrorMessage = "La contrasena debe tener al menos 6 caracteres.")]
[Compare(nameof(Password), ErrorMessage = "Las contrasenas no coinciden.")]
public string ConfirmPassword { get; set; } = string.Empty;
  • Phone: Must be valid phone format (optional)
  • Profile Photo URL: Must be valid URL format (optional)
[Phone(ErrorMessage = "Telefono invalido.")]
public string? Telefono { get; set; }

[Url(ErrorMessage = "Url invalida.")]
public string? FotoPerfilUrl { get; set; }

Backend Registration Process

When you submit the registration form, the system performs several operations:

1. Data Processing

Components/Pages/Register_Account.razor
var request = new RegisterRequest(
    email,
    _model.Password,
    _model.Nombre.Trim(),
    string.IsNullOrWhiteSpace(_model.Apellido) ? null : _model.Apellido.Trim(),
    string.IsNullOrWhiteSpace(_model.Telefono) ? null : _model.Telefono.Trim(),
    string.IsNullOrWhiteSpace(_model.Pais) ? null : _model.Pais.Trim(),
    string.IsNullOrWhiteSpace(_model.Ciudad) ? null : _model.Ciudad.Trim(),
    string.IsNullOrWhiteSpace(_model.FotoPerfilUrl) ? null : _model.FotoPerfilUrl.Trim()
);
All string inputs are trimmed to remove leading/trailing whitespace, and optional fields are converted to null if empty.

2. Password Hashing

Your password is securely hashed before storage:
Services/Auth/AuthService.cs
public string HashPassword(string password)
{
    var salt = RandomNumberGenerator.GetBytes(Pbkdf2SaltSize); // 16 bytes
    var hash = Rfc2898DeriveBytes.Pbkdf2(
        password,
        salt,
        Pbkdf2Iterations, // 100,000 iterations
        HashAlgorithmName.SHA256,
        Pbkdf2KeySize); // 32 bytes

    return $"{Convert.ToBase64String(salt)}:{Convert.ToBase64String(hash)}";
}
Security First: Your password is never stored in plain text. The system uses 100,000 iterations of PBKDF2 with SHA256, making it extremely resistant to brute-force attacks.

3. Database Registration

The system calls a stored procedure to create your account:
Services/Auth/AuthService.cs
await using var command = new SqlCommand("sp_Usuarios_Registrar", connection)
{
    CommandType = CommandType.StoredProcedure
};

command.Parameters.Add(new SqlParameter("@Email", SqlDbType.NVarChar, 150) { Value = request.Email });
command.Parameters.Add(new SqlParameter("@ContrasenaHash", SqlDbType.NVarChar, 300) { Value = passwordHash });
command.Parameters.Add(new SqlParameter("@Nombre", SqlDbType.NVarChar, 100) { Value = request.Nombre });
// ... additional parameters
1

Email Check

The system verifies that your email isn’t already registered
  • Result code 1: Email already exists
2

User Creation

A new user record is created with all provided information
  • Returns your new UsuarioId (User ID)
3

Role Assignment

You’re automatically assigned the base user role (RolId = 1)
await EnsureRoleAssignmentAsync(connection, userId, 1, cancellationToken);
4

Profile Photo

If you provided a profile photo URL, it’s saved to your account
await using var updatePhotoCommand = new SqlCommand(updatePhotoSql, connection);
updatePhotoCommand.Parameters.Add(new SqlParameter("@FotoPerfilUrl", SqlDbType.NVarChar, 300)
{
    Value = request.FotoPerfilUrl
});

Registration Success

Upon successful registration:

Success Message

You’ll see a green success alert: “Cuenta creada correctamente. Ahora puedes iniciar sesion.”

Auto-Fill Email

Your email is automatically populated in the form for easy re-entry
Components/Pages/Register_Account.razor
_successMessage = "Cuenta creada correctamente. Ahora puedes iniciar sesion.";
_model = new RegisterFormModel
{
    Email = email,
    ConfirmEmail = email
};
After seeing the success message, click the “Inicia sesion” link to go to the login page and access your new account.

Common Registration Errors

Error: “El email ya esta registrado.”Solution: This email is already in use. Try:
  • Using a different email address
  • Recovering your password if you forgot it
  • Contacting support if you believe this is an error
Common Issues:
  • Emails don’t match
  • Passwords don’t match
  • Password too short (< 6 characters)
  • Invalid email format
  • Invalid phone number format
  • Invalid URL format for profile photo
Solution: Review the highlighted fields and correct the validation errors before submitting.
Error: Registration takes too long or times outSolution:
  • Check your internet connection
  • Refresh the page and try again
  • Clear your browser cache
  • Contact support if the issue persists

After Registration: Logging In

Once your account is created, you can sign in:

Login Process

1

Navigate to Login

Go to /authentication or click “Inicia sesion” from the registration page
2

Enter Credentials

Provide your email and password:
Components/Pages/Login_Account.razor
var result = await AuthService.SignInAsync(new LoginRequest(
    _model.Email.Trim(),
    _model.Password));
3

Remember Email (Optional)

Check “Recordar correo” to save your email for future logins:
if (_model.RememberEmail)
{
    await Storage.SetAsync(RememberEmailKey, _model.Email.Trim());
}
4

Session Creation

Upon successful login:
  • A JWT token is generated for your session
  • Your profile data is stored in protected local storage
  • Your last login timestamp is updated
Session.SetUser(result);
await Storage.SetAsync("auth_session", result);

Login Validation

The system performs several security checks during login:
Services/Auth/AuthService.cs
// 1. Verify user exists
if (!await reader.ReadAsync(cancellationToken))
{
    throw new UnauthorizedAccessException("Credenciales incorrectas.");
}

// 2. Check account status
if (!estaActivo)
{
    throw new UnauthorizedAccessException("Usuario inactivo.");
}

if (estaBloqueado)
{
    throw new UnauthorizedAccessException("Usuario bloqueado.");
}

// 3. Verify password
if (!VerifyPassword(request.Password, passwordHash))
{
    throw new UnauthorizedAccessException("Credenciales incorrectas.");
}
For security reasons, the system doesn’t reveal whether the email or password is incorrect—it simply states “Credenciales incorrectas” (Incorrect credentials).

Initial Account Setup

After your first login, consider completing these setup tasks:

Complete Your Profile

Add missing information like phone number, location, and profile photo

Configure Payment Methods

Set up how you want to receive payments from customers

Create Your First Tour

Start building your tour offerings

Explore the Dashboard

Familiarize yourself with the host dashboard features

Profile Photo Setup

Your profile photo helps customers recognize and trust you:

Adding a Profile Photo

  1. Host your image online or use an existing URL
  2. Copy the full URL (must start with http:// or https://)
  3. Paste in the registration form or update it later in your profile
Accepted Formats: The system validates that your URL is properly formatted. Most image hosting services (Imgur, Cloudinary, etc.) work perfectly.

Profile Photo Display

Components/Pages/Dashboard/MyProfile.razor
<div class="avatar-preview">
    @if (!string.IsNullOrWhiteSpace(PhotoPreviewUrl))
    {
        <img src="@PhotoPreviewUrl" alt="Foto de perfil" loading="lazy" />
    }
    else
    {
        <span>@GetInitials()</span>
    }
</div>
If you don’t provide a photo, the system automatically displays your initials in an attractive gradient circle.

Country Selection

The registration form includes a comprehensive list of 195+ countries:
Components/Pages/Register_Account.razor
private readonly List<string> _countries =
[
    "Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina",
    "Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh",
    // ... 195+ countries total
    "United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela",
    "Vietnam","Yemen","Zambia","Zimbabwe"
];
Your country selection helps customers find local hosts and can be used for regional features in future updates.

Account Security Best Practices

Strong Passwords

  • Use at least 8 characters (minimum is 6)
  • Mix uppercase, lowercase, numbers, and symbols
  • Avoid common words or personal information

Unique Credentials

  • Don’t reuse passwords from other sites
  • Use a password manager if needed
  • Change your password periodically

Secure Email

  • Use an email account with 2FA enabled
  • Keep your email password secure
  • Monitor for suspicious login attempts

Regular Updates

  • Keep your contact information current
  • Update your profile photo periodically
  • Review your account status regularly

Troubleshooting

Possible Causes:
  • JavaScript errors in browser console
  • Browser extensions blocking requests
  • Network connectivity issues
Solutions:
  • Check browser console for errors (F12)
  • Disable browser extensions temporarily
  • Try a different browser
  • Clear cache and cookies
Note: The current version doesn’t send email confirmations automatically.Registration is immediate—you can log in right away after seeing the success message.
Steps to Resolve:
  1. Ensure you’ve logged in (not just registered)
  2. Check that you’re navigating to /dashboard/main
  3. Clear your browser cache
  4. Try logging out and back in
  5. Contact support if issue persists

Next Steps

1

Log In to Your Account

Use your email and password to access your host dashboard
2

Complete Your Profile

Add any missing information to build trust with customers
3

Explore the Dashboard

Familiarize yourself with the host tools and features
4

Create Your First Tour

Start building your tour offerings to attract customers

Ready to Get Started?

Now that you understand the registration process, head to /authentication/register to create your account and begin your journey as an AndanDo host!

Build docs developers (and LLMs) love