@@ -9,6 +9,7 @@ To install the plugin:
9
9
``` bash
10
10
npm install @adminforth/oauth --save
11
11
npm install @adminforth/google-oauth-adapter --save # for Google OAuth
12
+ npm install @adminforth/facebook-oauth-adapter --save # for Facebook OAuth
12
13
```
13
14
14
15
## Configuration
@@ -17,8 +18,8 @@ npm install @adminforth/google-oauth-adapter --save # for Google OAuth
17
18
18
19
You need to get the client ID and client secret from your OAuth2 provider.
19
20
20
- For Google:
21
- 1 . Go to the [ Google Cloud Console] ( https://console.cloud.google.com )
21
+ #### For Google:
22
+ 1 . Go to the [ Google Cloud Console] ( https://console.cloud.google.com ) and log in.
22
23
2 . Create a new project or select an existing one
23
24
3 . Go to ` APIs & Services ` → ` Credentials `
24
25
4 . Create credentials for OAuth 2.0 client IDs
@@ -32,6 +33,20 @@ GOOGLE_OAUTH_CLIENT_ID=your_google_client_id
32
33
GOOGLE_OAUTH_CLIENT_SECRET=your_google_client_secret
33
34
```
34
35
36
+ #### For Facebook:
37
+ 1 . Go to the [ Facebook Developers] ( https://developers.facebook.com/ )
38
+ 2 . Go to ` My apps `
39
+ 3 . Create a new project or select an existing one (choose Authenticate and request data from users with Facebook Login)
40
+ 4 . Go to ` Use Cases ` - ` Authenticate and request data from users with Facebook Login ` -> ` Customize ` and add email permissions
41
+ 5 . Go to ` App Settings ` -> ` Basic `
42
+ 6 . Get App ID and App secret
43
+ 7 . Add the credentials to your ` .env ` file:
44
+
45
+ ``` bash
46
+ FACEBOOK_OAUTH_CLIENT_ID=your_facebook_client_id
47
+ FACEBOOK_OAUTH_CLIENT_SECRET=your_facebook_client_secret
48
+ ```
49
+
35
50
### 2. Plugin Configuration
36
51
37
52
Configure the plugin in your user resource file:
0 commit comments