# Alepha - Server Auth

## Installation

Part of the `alepha` package. Import from `alepha/server/auth`.

```bash
npm install alepha
```

## Overview

OAuth2/OIDC authentication with social login providers.

**Features:**

- OAuth authentication provider
- Username/password authentication
- Google OAuth integration
- GitHub OAuth integration
- Apple OAuth integration
- Facebook OAuth integration
- Microsoft Entra ID (Azure AD) integration
- France Connect integration
- Cookie-based, SSR-friendly authentication
- Token management and refresh

## API Reference

### Primitives

- [`$auth`](https://latest.alepha.dev/docs/reference-primitives-$auth.md) - Creates an authentication provider primitive for handling user login flows.
- [`$authApple`](https://latest.alepha.dev/docs/reference-primitives-$authapple.md) - Already configured Apple authentication primitive.
- [`$authCredentials`](https://latest.alepha.dev/docs/reference-primitives-$authcredentials.md) - Already configured Credentials authentication primitive.
- [`$authFacebook`](https://latest.alepha.dev/docs/reference-primitives-$authfacebook.md) - Already configured Facebook authentication primitive.
- [`$authFranceConnect`](https://latest.alepha.dev/docs/reference-primitives-$authfranceconnect.md) - Creates an authentication provider primitive for France Connect.
- [`$authGithub`](https://latest.alepha.dev/docs/reference-primitives-$authgithub.md) - Already configured GitHub authentication primitive.
- [`$authGoogle`](https://latest.alepha.dev/docs/reference-primitives-$authgoogle.md) - Already configured Google authentication primitive.
- [`$authMicrosoft`](https://latest.alepha.dev/docs/reference-primitives-$authmicrosoft.md) - Already configured Microsoft Entra ID (Azure AD) authentication primitive.
