---
title: Introduction
description: Authenticate microservices using SuperTokens with the OAuth2 Client Credentials Flow.
sidebar:
  order: 1
---

<Prompt
  description="Implement OAuth2 client-credentials authentication for services."
  actions={["copy"]}
>
Implement SuperTokens machine-to-machine authentication for this repository. Inspect the services, backend SDK, deployment model, and existing secrets configuration first. Prefer the managed-service OAuth2 client-credentials flow when supported; otherwise explain the legacy-flow tradeoff. Configure the OAuth2 provider, clients, token acquisition, service authentication, scopes, and secret storage without committing credentials. Validate token issuance, expiry, invalid credentials, and protected service-to-service requests.
</Prompt>

## Overview

The recommended way to authenticate microservices with **SuperTokens** is by using the **OAuth2** specification.
You have to create an **OAuth2 Provider** and use the **OAuth2 Client Credentials Flow** for authorization.

## Prerequisites

<PaidFeatureCallout managedOnly />

Before you can dive deeper in the functionality there are a few things to keep in mind:
- The feature is available with the **SuperTokens Managed Service**.
It is not included in the **Self-Hosted** version.
- You can use it with the `Node.js` or the `Python` backend SDKs.

If you do not meet the previous requirements you can use the [legacy flow](/authentication/m2m/legacy-flow).

## Getting started

Two separate quickstart guides are available for you to follow.
The recommendation is to use the **Client Credentials Flow**.
The **Legacy Flow** guide is here for backwards compatibility and it is going to be deprecated in the future.

Before you explore a guide, read through the **OAuth2 Basics** page first.
It explains concepts used in each tutorial.

<CardGroup cols={3}>
  <Card title="OAuth2 Basics " href="/authentication/unified-login/oauth2-basics">
Go through a quick summary of the OAuth2 specifications to get accustomed with the language used in the quickstart guides.
</Card>
  <Card title="Client Credentials Flow" href="/authentication/m2m/client-credentials">
Implement a common authentication service that all your microservices can use.
</Card>
  <Card title="Legacy Flow" href="/authentication/m2m/legacy-flow">
Legacy info
</Card>
</CardGroup>
