tereta / customer
Requires
- php: >=8.4
- ext-json: *
- ext-pdo: *
- google/apiclient: ^2.19.2
- tereta/application: ^1.0
- tereta/config: ^1.0
- tereta/core: ^1.0
- tereta/db: ^1.0
- tereta/di: ^1.0
- tereta/email: ^1.0
- tereta/fs: ^1.0
- tereta/logger: ^1.0
- tereta/recaptcha: ^1.0
- tereta/route: ^1.0
- tereta/security: ^1.0
- tereta/session: ^1.0
- tereta/theme: ^1.0
- tereta/utilities: ^1.0
README
π Π ΡΡΡΠΊΠΈΠΉ | English
Table of Contents
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
googleAuthorisationconfiguration in.config.php) - Email link β passwordless login: a one-time code is sent to the email
Pages
| URL | Description |
|---|---|
/signin | Sign-in page |
/registration | New user registration |
/registration/verify | Email confirmation after registration |
/registration/success | Successful registration |
/customer/signOut | Sign 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
- Go tot the Google Cloud Console.
- 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