@nauth-toolkit/social-google 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,4 +4,54 @@ Google OAuth provider for [nauth-toolkit](https://nauth.dev).
|
|
|
4
4
|
|
|
5
5
|
Adds Google sign-in with support for web redirect flows and native mobile token verification. Handles OAuth 2.0 authorization, token exchange, and user profile retrieval. Automatically links Google accounts to existing users by email.
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**[Documentation](https://nauth.dev/docs/guides/social/how-social-login-works)** · **[GitHub](https://github.com/noorixorg/nauth)**
|
|
8
|
+
|
|
9
|
+
> Part of [nauth-toolkit](https://www.npmjs.com/package/@nauth-toolkit/core). Requires `@nauth-toolkit/core`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @nauth-toolkit/social-google
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Enable in your auth config:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
const authConfig = {
|
|
23
|
+
social: {
|
|
24
|
+
google: {
|
|
25
|
+
enabled: true,
|
|
26
|
+
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
27
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**NestJS** — import the module and it auto-registers:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { GoogleSocialAuthModule } from '@nauth-toolkit/social-google/nestjs';
|
|
37
|
+
|
|
38
|
+
@Module({
|
|
39
|
+
imports: [NAuthModule.forRoot(authConfig), GoogleSocialAuthModule],
|
|
40
|
+
})
|
|
41
|
+
export class AuthModule {}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Related packages
|
|
47
|
+
|
|
48
|
+
| Package | Purpose |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| [`@nauth-toolkit/social-apple`](https://www.npmjs.com/package/@nauth-toolkit/social-apple) | Sign in with Apple |
|
|
51
|
+
| [`@nauth-toolkit/social-facebook`](https://www.npmjs.com/package/@nauth-toolkit/social-facebook) | Facebook Login |
|
|
52
|
+
|
|
53
|
+
See the [full package list](https://www.npmjs.com/package/@nauth-toolkit/core#package-ecosystem) in the core README.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
Free to use. See [license](https://nauth.dev/docs/license).
|