File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
adminforth/documentation/docs/tutorial/05-Plugins Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ GOOGLE_CLIENT_SECRET=your_google_client_secret
3737Configure the plugin in your user resource file:
3838
3939``` typescript title="./resources/adminuser.ts"
40- import OAuth2Plugin from ' @adminforth/oauth' ;
40+ import OAuthPlugin from ' @adminforth/oauth' ;
4141import AdminForthAdapterGoogleOauth2 from ' @adminforth/google-oauth-adapter' ;
4242
4343// ... existing resource configuration ...
4444
4545plugins : [
46- new OAuth2Plugin ({
46+ new OAuthPlugin ({
4747 adapters: [
4848 new AdminForthAdapterGoogleOauth2 ({
4949 clientID: process .env .GOOGLE_CLIENT_ID ,
@@ -52,7 +52,6 @@ plugins: [
5252 }),
5353 ],
5454 emailField: ' email' , // Required: field that stores the user's email
55- emailConfirmedField: ' email_confirmed' // Optional: field to track email verification
5655 }),
5756]
5857```
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ import TwoFactorsAuthPlugin from "../../plugins/adminforth-two-factors-auth";
1111import EmailResetPasswordPlugin from "../../plugins/adminforth-email-password-reset/index.js" ;
1212import { v1 as uuid } from "uuid" ;
1313import EmailAdapterAwsSes from "../../adapters/adminforth-email-adapter-aws-ses/index.js" ;
14- import { OAuthPlugin } from "../../plugins/adminforth-oauth" ;
15- import { AdminForthAdapterGoogleOauth2 } from "../../adapters/adminforth-google-oauth-adapter" ;
16- import { AdminForthAdapterGithubOauth2 } from "../../adapters/adminforth-github-oauth-adapter" ;
14+ import OAuthPlugin from "../../plugins/adminforth-oauth" ;
15+ import AdminForthAdapterGoogleOauth2 from "../../adapters/adminforth-google-oauth-adapter" ;
16+ import AdminForthAdapterGithubOauth2 from "../../adapters/adminforth-github-oauth-adapter" ;
1717export default {
1818 dataSource : "maindb" ,
1919 table : "users" ,
You can’t perform that action at this time.
0 commit comments