Skip to content

Commit 3428e6b

Browse files
authored
Adds 'happycode/tenzero-auth' bundle (#1932)
* Adds happycode/tenzero-auth bundle * Manifest Fix * Updates initial config to new template * Example Configs * Recipe validated * Recipe valided again * Re-Run * Extra compatability * Re-Testing * Dropping old package * Recipe bumped to Version 1.1
1 parent 5fde44b commit 3428e6b

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
happycode_tenzero_auth:
2+
# Optional app name displayed in the auth layout.
3+
app_name: "TenZero"
4+
5+
# Optional app description displayed in the auth layout.
6+
app_description: "Built in authentication for TenZero."
7+
8+
# The class that will be used to authenticate user.
9+
user_class: 'App\Entity\User'
10+
11+
# The field that will be used to identify the user.
12+
user_field: "email"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bundles": {
3+
"Happycode\\TenZeroAuth\\TenZeroAuthBundle": ["all"]
4+
},
5+
"copy-from-recipe": {
6+
"config/": "%CONFIG_DIR%/"
7+
}
8+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Thanks for installing Happycode TenZeroAuth!
2+
3+
Next steps (recommended):
4+
5+
1) Configure the bundle
6+
Add a config file (or edit your existing one):
7+
config/packages/happycode_tenzero_auth.yaml
8+
9+
Minimal example:
10+
11+
happycode_tenzero_auth:
12+
user_class: App\Entity\User
13+
user_field: email
14+
15+
Notes:
16+
- user_class must be your Doctrine User entity class.
17+
- user_field is the identifier field used for login (e.g. "email" or "username").
18+
19+
2) Ensure your User entity is compatible
20+
Your App\Entity\User should extend the bundle base user model provided by TenZeroAuth.
21+
If you haven’t created your User entity yet, generate it (or update it) accordingly
22+
23+
3) JWT keys / ENV vars
24+
This bundle expects JWT configuration via environment variables.
25+
Add these to your .env.local (values are placeholders):
26+
27+
JWT_SECRET_KEY="[%PROJECT_DIR%]/config/jwt/private.pem"
28+
JWT_PUBLIC_KEY="[%PROJECT_DIR%]/config/jwt/public.pem"
29+
JWT_PASSPHRASE="<your-passphrase>"
30+
31+
Then generate the keypair (if you haven’t already), e.g. using the tooling recommended
32+
by your JWT bundle, and ensure the files exist at the configured paths.
33+
34+
4) Database / migrations
35+
If this recipe adds entities or mapping, generate & run migrations:
36+
37+
php bin/console doctrine:migrations:diff
38+
php bin/console doctrine:migrations:migrate
39+
40+
5) Routes / UI
41+
After install, you should have auth endpoints available (login/logout, and optionally register).
42+
Start your server and verify the auth screens load correctly.
43+
44+
6) Optional: customize
45+
You can override defaults such as:
46+
- theme
47+
- app_name / app_description
48+
- enable_register
49+
- login_redirect_url / logout_redirect_url
50+
- token_ttl, reset_password_link_ttl
51+
- access_control overrides (advanced)
52+
53+
If something doesn’t work, double-check:
54+
- Your user_class exists and autoloads
55+
- Your user_class is the expected base type for this bundle
56+
- Your user_field exists on the user (property or getter)
57+
- JWT keys and passphrase are correct

0 commit comments

Comments
 (0)