feat: Implement authPersistence in ThemeConfig
#1240
+18
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implements
authPersistenceoption forThemeConfig, to allow disabling of sessionStorage persistence.sessionStorage(current behavior)falseto disable storageMotivation and Context
Resolves #1239
Also provides a workaround to resolve #1238
An
authPersistenceconfiguration option is mentioned in the v0.2.1 (Dec 5, 2021) changelog (https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/main/CHANGELOG.md#021-dec-5-2021), and the configuration types are already in place, but it is not currently implemented in the latest version.How Has This Been Tested?
Add
authPersistence: falsetodocusaurus.config.ts:As a side effect, persistence of server variables will also be disabled by settings this to
false, as this uses the same persistence middleware.NOTE: The current types in https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/main/packages/docusaurus-theme-openapi-docs/src/types.ts have a slight spelling mistake:
authPersistance. This has been renamed toauthPersistence.Types of changes
Checklist