MishkaCmsCore. Accounts. Changes. DebugTokenGeneration
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
Debug change for troubleshooting token generation and tenant issues.
This change provides detailed logging throughout the token generation process, particularly focusing on tenant handling and context management. It logs the changeset state before and after token generation, attempts to clear tenant information for proper token creation, and tracks the user creation lifecycle.
The change attempts to resolve tenant-related issues by clearing the tenant from multiple locations in the changeset and setting authentication-specific context flags. It uses after_action callbacks to log the final state of created users, helping identify where tenant information might be incorrectly retained.
This module should only be used during development and debugging. It exposes sensitive information through logs and should be removed or disabled in production environments. The extensive logging helps trace authentication flow issues and tenant isolation problems in multi-tenant authentication scenarios.
Summary
Functions
Applies debug logging and tenant manipulation to the changeset.
Functions
Applies debug logging and tenant manipulation to the changeset.
Logs changeset state at multiple points, attempts to clear tenant information, and tracks the user creation process through after_action callbacks.
Parameters
changeset- The Ash changeset being modified_opts- Change options (unused)_context- Change context (unused)
Returns
Modified changeset with debug logging and tenant clearing attempts