/redaxo-ycom:ycom-tokensfrom redaxo-ycom
Implements YCom's single-use token system for magic-link login, password-reset emails, and registration confirmation. Covers token creation, validation, email template integration, and end-to-end flow patterns.
Ships in redaxo-ycom. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
YCom's token system replaces the old activation_key patterns with a proper one-time-token model. Tokens are stored, single-use, and tied to a YCom user.
| Type | Use |
|---|---|
login | Magic link – click to log in |
password_reset | Click to land logged-in on the password-change form |
register | Click to confirm a new registration |
You can also use custom strings as types when you need a flow that isn't one of these.
ycom_user_token|token|create|type|email_field
ycom_user_token|token|validate|type|error_message
create – generates a token, stores it on the matched user, and exposes it as REX_YFORM_DATA[field=token] for the email templatevalidate – consumes a token from the URL; on success, the matching user becomes the current dataset (and is logged in for login and password_reset types)Fourth slot in
createis documentation, not configuration. Despite theemail_fieldlabel, thecreatebranch readsvalue_pool['sql']['email']directly — the slot is ignored at runtime. Always name the email form field literally
ycom_user_token|token|create|login|email
text|email|E-Mail
validate|empty|email|Bitte E-Mail eingeben.
validate|in_table|email|rex_ycom_user|email|E-Mail nicht gefunden.
action|tpl2email|direct_login_de|email|
action|showtext|Link wurde per E-Mail gesendet.|||1
<?php
$url = rex_getUrl($validation_article_id, null, ['token' => 'REX_YFORM_DATA[field=token]']);
$full_url = trim(rex::getServer(), '/') . trim($url, '.');
?>
<p><a href="<?= $full_url ?>">Direkt einloggen</a></p>
ycom_user_token|token|validate|login|Token ist ungueltig oder abgelaufen.
That single line, on the destination article, validates the token and logs the user in. Add a redirect or success message after.
ycom_user_token|token|create|password_reset|email
Validation form (combined with forced password change):
ycom_user_token|token|validate|password_reset|Token ungueltig.
hidden|new_password_required|1
action|ycom_auth_db|update
After validation, render the password-change form (see the ycom-forms skill) — the user is already logged in and the new_password_required flag will be cleared on submit.
text|email|E-Mail
validate|type|email|email|Bitte gueltige E-Mail eingeben.
validate|unique|email|E-Mail wird bereits verwendet.|rex_ycom_user
ycom_auth_password|password|Passwort|...
hidden|status|0
action|copy_value|email|login
action|db|rex_ycom_user
ycom_user_token|token|create|register|email
action|tpl2email|register_confirm|email|
Important: the form must contain a field literally named email (see "Field syntax" above for why the fourth pipe slot doesn't help here).
Confirmation:
ycom_user_token|token|validate|register|Token ungueltig.
hidden|status|1
action|ycom_auth_db|update
This pattern is cleaner than the older activation_key approach (see ycom-forms) because the token is single-use and validated centrally.
email – the create branch reads value_pool['sql']['email'] and throws email not found. The fourth pipe slot is a documentation hint, not a configurable field selector.rex_getUrl() but forgetting the article ID matches the article that has the validate field – wrong target = Token ungueltig.csrf_protection|1 (default) on the validation article – the email link can't carry a CSRF token, so always add objparams|csrf_protection|0 on validation forms.login-type token to also reset the password – use password_reset type. login only logs in.validate|customfunction that checks created_at against now.What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/ycom-extension-pointsYCom extension points (YCOM_CONFIG, YCOM_AUTH_INIT, YCOM_AUTH_LOGIN, YCOM_USER_CREATE, etc.), the injection system for intercepting the auth flow (OTP, password change, terms-of-use, custom injections), session management (rex_ycom_user_session), and user activity logging (rex_ycom_log). Use when the user customizes the auth flow, intercepts login/logout, adds custom auth steps (e.g. mandatory profile completion), manages sessions, or sets up activity logging./ycom-external-authExternal authentication for YCom – SAML, OAuth2, and CAS. Covers config files (data/addons/ycom/saml.php, oauth2.php, cas.php), the ycom_auth_saml/oauth2/cas value fields, default user data, allowed-domain restrictions, and field-mapping via YCOM_AUTH_*_MATCHING extension points. Use when the user integrates SSO, configures OAuth2 providers, maps SAML attributes to YCom user fields, or enables direct-link login./ycom-formsReady-to-use YCom form recipes – login, logout, registration with email confirmation, profile edit, password change (with and without old-password check), password reset, terms-of-use re-acceptance. Pipe and PHP syntax. Includes the YCom-specific value/validate/action fields (ycom_auth_password, ycom_auth_load_user, ycom_auth_logout, ycom_auth_returnto, ycom_auth_db, ycom_user_token, etc.). Use when the user builds any frontend form that interacts with YCom.npx claudepluginhub friendsofredaxo/claude-marketplace --plugin redaxo-ycomOther plugins' skills for the same job