Skip to content

Commit e1c35b5

Browse files
committed
chore: further documents strategies
1 parent f22f56e commit e1c35b5

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/authentication/config.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,17 @@ Behind the scenes, Payload uses PassportJS to power its local authentication str
208208
developer. Otherwise, just let Payload's built-in authentication handle user
209209
auth for you.
210210
</Banner>
211+
212+
The `strategies` property is an array that takes objects with the following properties:
213+
214+
**`strategy`**
215+
216+
This property can accept a Passport strategy directly, or you can pass a function that takes a `payload` argument, and returns a Passport strategy.
217+
218+
**`name`**
219+
220+
If you pass a strategy to the `strategy` property directly, the `name` property is optional and allows you to override the strategy's built-in name.
221+
222+
However, if you pass a function to `strategy`, `name` is a required property.
223+
224+
In either case, Payload will prefix the strategy name with the collection `slug` that the strategy is passed to.

src/auth/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ export interface IncomingAuthType {
9595
strategies?: {
9696
name?: string
9797
strategy: AuthStrategy
98-
refresh?: boolean
99-
logout?: boolean
10098
}[]
10199
}
102100

0 commit comments

Comments
 (0)