Social Auth
Type: OAuth Provider Packages
Available Providers
| Package | Provider | Installation |
|---|---|---|
@nauth-toolkit/social-google | Google OAuth 2.0 | yarn add @nauth-toolkit/social-google |
@nauth-toolkit/social-apple | Sign in with Apple | yarn add @nauth-toolkit/social-apple |
@nauth-toolkit/social-facebook | Facebook Login | yarn add @nauth-toolkit/social-facebook |
Enable a provider
- NestJS
- Express
- Fastify
@Module({
imports: [
GoogleSocialAuthModule, // provider module
AuthModule.forRoot(config), // core module
],
})
export class AppModule {}
const nauth = await NAuth.create({
config,
dataSource,
adapter: new ExpressAdapter(),
});
const nauth = await NAuth.create({
config,
dataSource,
adapter: new FastifyAdapter(),
});
Configuration keys
Providers are configured under config.social:
config.social.googleconfig.social.appleconfig.social.facebook