Skip to content

Commit 04e6a52

Browse files
committed
Rename userRedirectionPath to successRedirect
1 parent 9f96c78 commit 04e6a52

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ function oAuthPluginServer(
307307
})
308308

309309
// Redirect to the defined path or default to the admin dashboard
310-
const userRedirectionPath = options.userRedirectionPath || '/admin'
311-
res.redirect(userRedirectionPath)
310+
res.redirect(options.successRedirect || '/admin')
312311
},
313312
},
314313
]),

src/types.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@ export interface oAuthPluginOptions extends StrategyOptions {
5050
Button?: ComponentType<any>
5151
}
5252
userCollection?: {
53-
/** Defaults to "users" */
53+
/** @default "users" */
5454
slug?: string
5555
}
5656
/** If the collection does not have a field with name "sub", it will be created */
5757
subField?: {
58-
/** Defaults to "sub" */
58+
/** @default "sub" */
5959
name?: string
6060
}
61-
/** Which path to redirect the authenticated user to, redirects to /admin by default */
62-
userRedirectionPath?: string
61+
/** Path or URL to redirect the authenticated user to
62+
* @default /admin
63+
*/
64+
successRedirect?: string
6365
}

0 commit comments

Comments
 (0)