You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/05-Plugins/11-oauth.md
+54-17Lines changed: 54 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# OAuth Authentication
2
2
3
-
The OAuth plugin enables OAuth2-based authentication in AdminForth, allowing users to sign in using their Google, GitHub, or other OAuth2 provider accounts.
3
+
The OAuth plugin enables OAuth2-based authentication in AdminForth, allowing users to sign in using their Google, GitHub, Facebook or other OAuth2 provider accounts.
4
4
5
5
## Installation
6
6
@@ -9,16 +9,16 @@ 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
13
12
```
14
13
15
14
## Configuration
16
15
17
-
### 1. OAuth Provider Setup
16
+
This section provides a step-by-step guide to configure the OAuth plugin for Google authentication. See [OAuth2 Providers](#oauth2-providers) for other providers.
17
+
18
+
### 1. OAuth Provider Setup (Google Example)
18
19
19
20
You need to get the client ID and client secret from your OAuth2 provider.
20
21
21
-
#### For Google:
22
22
1. Go to the [Google Cloud Console](https://console.cloud.google.com) and log in.
Just fork any existing adapter e.g. [Google](https://github.com/devforth/adminforth-google-oauth-adapter) and adjust it to your needs.
146
181
182
+
This is really easy, you have to change several then 10 lines of code in this [file](https://github.com/devforth/adminforth-google-oauth-adapter/blob/main/index.ts)
147
183
184
+
Then just publish it to npm and install it in your project.
0 commit comments