Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.0.9

Payload CMS Release: Release 1.0.9

Tag Name: v1.0.9

Release Date: 7/21/2022

Payload CMS LogoPayload CMS

Payload CMS is a modern, self-hosted headless content management system built with TypeScript, Node.js, and MongoDB. It's designed specifically for developers who want full control over their content management system while maintaining a powerful admin interface for content editors.

TL;DR

PayloadCMS v1.0.9 brings important authentication enhancements, allowing for more flexible custom auth strategies with better naming and payload access. This release also fixes several bugs related to JWT token handling, schema indexing, GraphQL logging, UI improvements, and documentation corrections. These changes improve developer experience and system reliability while maintaining backward compatibility.

Highlight of the Release

    • Enhanced custom authentication strategy support with access to payload instance
    • Improved JWT token handling for systems with disabled local strategy
    • Added ability to create database indexes directly from schema
    • UI improvements for radio inputs with sharper edges
    • Better error messaging and documentation

Migration Guide

Migration from v1.0.8 to v1.0.9

This release doesn't require any specific migration steps as it maintains backward compatibility with previous versions. However, there are a few things to note:

  1. For Custom Auth Strategies: If you're using custom authentication strategies, you now have access to the payload instance and strategy names. Consider updating your implementations to take advantage of these new parameters.

  2. JWT Token Handling: If you were relying on the email being present in JWT tokens, be aware that the system now uses ID instead. This should be more reliable, especially if you're using disableLocalStrategy.

  3. Strategy Naming: When providing custom authentication, strategy names are now required. Ensure your custom strategies have proper names defined.

No database migrations or breaking changes are included in this release.

Upgrade Recommendations

This is a recommended upgrade for all PayloadCMS users, especially those who:

  1. Use custom authentication strategies
  2. Have implemented systems with disableLocalStrategy enabled
  3. Need to create database indexes from schema definitions
  4. Rely on GraphQL functionality

The upgrade process should be straightforward with no breaking changes:

npm install [email protected]
# or
yarn add [email protected]

After upgrading, test your authentication flows, particularly if you use custom strategies or have disabled the local strategy.

Bug Fixes

Authentication Fixes

  • JWT Token Handling: Fixed an issue where the system assumed Email would be present on JWT tokens. Now using ID instead, which is more reliable especially when using disableLocalStrategy (#789)

UI and Visual Improvements

  • Radio Input Styling: Sharpened radio input edges by replacing the box-shadow trick with proper border properties, resulting in crisper UI elements (#768)

Documentation and Developer Experience

  • Access Type Documentation: Corrected documentation to match the underlying Access type, ensuring developers have accurate information (#792)
  • GraphQL Logging: Fixed GraphQL generation logging output for better developer experience (#795)
  • Test Configuration: Added helpful error messages when test configurations don't exist

Database Functionality

  • Schema Indexing: Fixed functionality to enable index creation directly from schema definitions (#791)

New Features

Enhanced Authentication Capabilities

  • Custom Auth Strategy Improvements: Custom authentication strategies now receive the payload instance and strategy names as parameters, enabling more powerful and context-aware authentication implementations (#781)
  • Flexible Strategy Naming: The system now uses the provided auth strategy name or falls back to strategy.name, making custom authentication configuration more intuitive (#797)
  • Required Strategy Names: When providing custom authentication, strategy names are now required, improving clarity and preventing potential issues

Schema Enhancements

  • Index Creation from Schema: Added support for creating database indexes directly from schema definitions, improving database performance configuration options (#791)

Security Updates

No specific security fixes were included in this release. The JWT token handling improvement (#789) is primarily a functional fix rather than addressing a security vulnerability, though it does improve the robustness of authentication systems when using non-standard configurations.

Performance Improvements

Database Performance

  • The ability to create indexes directly from schema definitions (#791) can lead to improved query performance when properly configured

UI Rendering

  • Radio input styling improvements may result in slightly better rendering performance by using more efficient CSS properties (border vs. box-shadow)

Impact Summary

PayloadCMS v1.0.9 is a maintenance release that focuses on improving authentication flexibility and fixing several bugs. The most significant changes are in the authentication system, where custom strategies now receive the payload instance and have better naming support. This enables more powerful authentication implementations while maintaining backward compatibility.

The release also addresses several pain points: JWT token handling now works better with non-standard configurations, database indexes can be created directly from schema definitions, and the UI has been improved with sharper radio input styling. Documentation and error messaging have also been enhanced.

Overall, this release improves developer experience and system reliability without introducing breaking changes, making it a recommended upgrade for all PayloadCMS users.

Full Release Notes

1.0.9 (2022-07-21)

Bug Fixes

  • avoid assuming Email will be present on JWT token. Using ID instead as email might not be in if using disableLocalStrategy (#789) (3b4d5af)
  • doc: corrects doc to match underlying Access type (#792) (6f8b8d0)
  • enable index creation from schema (#791) (2a1f387)
  • graphql gen logging output (#795) (8a81d0b)
  • sharpens radio input edges by replacing box-shadow trick with border property (#768) (e2c366f)

Features

  • pass payload and names to custom auth strategies (#781) (3a3026c)
  • use provided auth strategy name or strategy.name (#797) (f22f56e)

Statistics:

File Changed16
Line Additions236
Line Deletions52
Line Changes288
Total Commits10

User Affected:

  • Can now implement custom authentication strategies with access to the payload instance
  • No longer need to rely on email being present in JWT tokens when using disableLocalStrategy
  • Can create database indexes directly from schema definitions
  • Will see improved GraphQL logging output

Contributors:

denolfeJarrodMFleschsangallimarcolucianogreinerDanRibbensjmikrut