Tereta/Customer Module

Overview

User management module. Provides registration, authentication, email verification, and profile management.

Authentication Methods

Three sign-in methods are supported:

  • Password — classic email and password login
  • Google OAuth — sign in via Google account (requires googleAuthorisation configuration in .config.php)
  • Email link — passwordless login: a one-time code is sent to the email

Pages

URLDescription
/signinSign-in page
/registrationNew user registration
/registration/verifyEmail confirmation after registration
/registration/successSuccessful registration
/customer/signOutSign out

Account Dashboard

Available at /customer after authentication:

  • Edit profile (name, phone, avatar)
  • Change email (with re-verification)
  • Change password
  • Link/unlink Google account
  • Accept user agreement (if configured)
Supported avatar formats: JPEG, PNG, GIF, WebP.

Configuration

Configuration keys:
agreement.document — User agreement content (HTML or text).
agreement.links.privacyPolicy — Link to privacy policy file.
agreement.links.disclaimer — Link to disclaimer file.
agreement.links.terms — Link to terms of service file.
googleAuthorisation.clientId — Google Client ID for OAuth.
googleAuthorisation.clientSecret — Google Client Secret for OAuth.

return Value::factory()->create()
    ->set('agreement', Value::factory()->create() # User agreement settings
        ->set('document', '{agreement_document}') # Agreement content (HTML or text)
        ->set('links.privacyPolicy', Value::factory()->create()->set('label', 'Privacy Policy')->set('location', '{privacy_policy_location}')) # Link to privacy policy file
        ->set('links.disclaimer', Value::factory()->create()->set('label', 'Disclaimer')->set('location', '{disclaimer_location}')) # Link to disclaimer file
        ->set('links.terms', Value::factory()->create()->set('label', 'Terms of Service')->set('location', '{terms_of_service_location}')) # Link to terms of service file
    )
    ->set('googleAuthorisation', Value::factory()->create() # Google OAuth settings
        ->set('clientId', '{google_client_id}') # Google Client ID
        ->set('clientSecret', '{google_client_secret}')) # reCAPTCHA settings for bot protection

Google OAuth Setup

  1. Go tot the Google Cloud Console.
  2. APIs & Services > Credentials > Create Credentials > OAuth client ID.
Or directly to the Auth Clients (https://console.cloud.google.com/auth/clients).

Author and License

Author: Tereta Alexander
Website: tereta.dev
License: Apache License 2.0. See LICENSE.

 www.████████╗███████╗██████╗ ███████╗████████╗ █████╗
     ╚══██╔══╝██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗
        ██║   █████╗  ██████╔╝█████╗     ██║   ███████║
        ██║   ██╔══╝  ██╔══██╗██╔══╝     ██║   ██╔══██║
        ██║   ███████╗██║  ██║███████╗   ██║   ██║  ██║
        ╚═╝   ╚══════╝╚═╝  ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝
                                                      .dev

Copyright (c) 2024-2026 Tereta Alexander