Skip to content

Commit 1af1a55

Browse files
committed
docs: add missing section in docs for oauth
AdminForth/1746/add-missing-resource-registrat
1 parent 6d7f540 commit 1af1a55

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • adminforth/documentation/docs/tutorial/09-Plugins

adminforth/documentation/docs/tutorial/09-Plugins/11-oauth.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,26 @@ export default {
106106
} satisfies AdminForthResourceInput;
107107
```
108108

109+
Then register the resource in `index.ts`:
110+
111+
```ts title="./index.ts"
112+
//diff-add
113+
import adminUserExternalIdentitiesResource from "./resources/adminUserExternalIdentities";
114+
115+
116+
... new AdminForth({
117+
dataSources: [...],
118+
...
119+
resources: [
120+
apartmentsResource,
121+
usersResource,
122+
//diff-add
123+
adminUserExternalIdentitiesResource,
124+
],
125+
...
126+
})
127+
```
128+
109129
## Configuration
110130

111131
This example configures Google OAuth. See [OAuth2 Providers](#oauth2-providers) for provider setup details.

0 commit comments

Comments
 (0)