diff --git a/docs/authentication/operations.mdx b/docs/authentication/operations.mdx index ad8248db770..7f3a02b5750 100644 --- a/docs/authentication/operations.mdx +++ b/docs/authentication/operations.mdx @@ -269,9 +269,9 @@ const result = await payload.verifyEmail({ }) ``` -Note that the token you need to pass to the `verifyEmail` function is unique to verification and is not the same as the token that you can retrieve from the `forgotPassword` operation. It can be found on the user document, as a hidden `_verificationToken` field. +**Note:** the token you need to pass to the `verifyEmail` function is unique to verification and is not the same as the token that you can retrieve from the `forgotPassword` operation. It can be found on the user document, as a hidden `_verificationToken` field. If you'd like to retrieve this token, you can use the Local API's `find` or `findByID` methods, setting `showHiddenFields: true`. -If you'd like to retrieve this token, you can use the Local API's `find` or `findByID` methods, setting `showHiddenFields: true`. +**Note:** if you do not have a `config.serverURL` set, Payload will attempt to create one for you if the user was created via REST or GraphQL by looking at the incoming `req`. But this is not supported if you are creating the user via the Local API's `payload.create()` method. If this applies to you, and you do not have a `serverURL` set, you may want to override your `verify.generateEmailHTML` function to provide a full URL to link the user to a proper verification page. ## Unlock @@ -348,6 +348,8 @@ const token = await payload.forgotPassword({ }) ``` +**Note:** if you do not have a `config.serverURL` set, Payload will attempt to create one for you if the `forgot-password` operation was triggered via REST or GraphQL by looking at the incoming `req`. But this is not supported if you are calling `payload.forgotPassword()` via the Local API. If you do not have a `serverURL` set, you may want to override your `auth.forgotPassword.generateEmailHTML` function to provide a full URL to link the user to a proper reset-password page. + **Tip:** diff --git a/docs/configuration/overview.mdx b/docs/configuration/overview.mdx index 373ff60f244..d304da7f2d0 100644 --- a/docs/configuration/overview.mdx +++ b/docs/configuration/overview.mdx @@ -106,7 +106,6 @@ _\* An asterisk denotes that a property is required._ Some properties are removed from the client-side bundle. [More details](../admin/components#accessing-the-payload-config). - ### Typescript Config Payload exposes a variety of TypeScript settings that you can leverage. These settings are used to auto-generate TypeScript interfaces for your [Collections](../configuration/collections) and [Globals](../configuration/globals), and to ensure that Payload uses your [Generated Types](../typescript/overview) for all [Local API](../local-api/overview) methods. diff --git a/test/lexical-mdx/collections/Posts/index.ts b/test/lexical-mdx/collections/Posts/index.ts index 5aa80dad988..7cfcb10d5c5 100644 --- a/test/lexical-mdx/collections/Posts/index.ts +++ b/test/lexical-mdx/collections/Posts/index.ts @@ -13,9 +13,9 @@ import { BannerBlock } from '../../mdx/jsxBlocks/banner.js' import { CodeBlock } from '../../mdx/jsxBlocks/code/code.js' import { InlineCodeBlock } from '../../mdx/jsxBlocks/inlineCode.js' import { PackageInstallOptions } from '../../mdx/jsxBlocks/packageInstallOptions.js' +import { RestExamplesBlock } from '../../mdx/jsxBlocks/restExamples/index.js' import { TextContainerBlock } from '../../mdx/jsxBlocks/TextContainer.js' import { TextContainerNoTrimBlock } from '../../mdx/jsxBlocks/TextContainerNoTrim.js' -import { RestExamplesBlock } from '../../mdx/jsxBlocks/restExamples/index.js' export const postsSlug = 'posts' diff --git a/test/lexical-mdx/result.json b/test/lexical-mdx/result.json index a6583c1b0f0..5528730b5e0 100644 --- a/test/lexical-mdx/result.json +++ b/test/lexical-mdx/result.json @@ -44,4 +44,4 @@ } }, "frontMatter": [] -} \ No newline at end of file +} diff --git a/test/lexical-mdx/tests/default.test.ts b/test/lexical-mdx/tests/default.test.ts index 0c349c81f34..d93e4eca844 100644 --- a/test/lexical-mdx/tests/default.test.ts +++ b/test/lexical-mdx/tests/default.test.ts @@ -1,5 +1,6 @@ -import { tableJson } from '../tableJson.js' import type { Test } from '../int.spec.js' + +import { tableJson } from '../tableJson.js' import { textToRichText } from '../textToRichText.js' export const defaultTests: Test[] = [ diff --git a/test/lexical-mdx/tests/restExamples.test.ts b/test/lexical-mdx/tests/restExamples.test.ts index 1b9935bd6b5..8c38a237318 100644 --- a/test/lexical-mdx/tests/restExamples.test.ts +++ b/test/lexical-mdx/tests/restExamples.test.ts @@ -1,7 +1,8 @@ import { readFileSync } from 'fs' -import type { Test } from '../int.spec.js' -import { fileURLToPath } from 'url' import path from 'path' +import { fileURLToPath } from 'url' + +import type { Test } from '../int.spec.js' const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename) diff --git a/test/lexical-mdx/tests/restExamples2.test.ts b/test/lexical-mdx/tests/restExamples2.test.ts index 6a3236e80f2..987c9a48324 100644 --- a/test/lexical-mdx/tests/restExamples2.test.ts +++ b/test/lexical-mdx/tests/restExamples2.test.ts @@ -1,7 +1,8 @@ import { readFileSync } from 'fs' -import type { Test } from '../int.spec.js' -import { fileURLToPath } from 'url' import path from 'path' +import { fileURLToPath } from 'url' + +import type { Test } from '../int.spec.js' const filename = fileURLToPath(import.meta.url) const dirname = path.dirname(filename)