[GH-ISSUE #676] Add a plugin for Machine-to-Machine (M2M) Authorization #8372

Closed
opened 2026-04-13 03:26:43 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @bfovez on GitHub (Nov 27, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/676

I currently exposing an API which is used by other servers, and non-human processes.

The Auth server (the one that would be powered by Better-Auth) is on a different machine than the API server.

I'm currently using for that purpose a machine-to-machine (M2M) auth system based on client id + client secret. This is an Client Credential Grant OAuth 2.0 flow. The current auth server issues tokens that are validated on the API server.

I cannot used email / password for this use case, because of the email verification flow (during sign-up) and MFA flow (during sign-in).

I would be great to have this M2M feature in Better-Auth.

Originally created by @bfovez on GitHub (Nov 27, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/676 I currently exposing an API which is used by other servers, and non-human processes. The Auth server (the one that would be powered by Better-Auth) is on a different machine than the API server. I'm currently using for that purpose a machine-to-machine (M2M) auth system based on client id + client secret. This is an [Client Credential Grant](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) OAuth 2.0 flow. The current auth server issues tokens that are validated on the API server. I cannot used email / password for this use case, because of the email verification flow (during sign-up) and MFA flow (during sign-in). I would be great to have this M2M feature in Better-Auth.
GiteaMirror added the enhancementlocked labels 2026-04-13 03:26:43 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 20, 2025):

Hi, @bfovez. I'm Dosu, and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You requested the integration of a Machine-to-Machine (M2M) authorization plugin.
  • The goal is to support the Client Credential Grant OAuth 2.0 flow.
  • This is necessary for API authentication between servers and non-human processes.
  • The current email/password method is unsuitable due to verification and MFA requirements.
  • There have been no comments or developments on this issue yet.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If there is no response, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

<!-- gh-comment-id:2992143712 --> @dosubot[bot] commented on GitHub (Jun 20, 2025): Hi, @bfovez. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You requested the integration of a Machine-to-Machine (M2M) authorization plugin. - The goal is to support the Client Credential Grant OAuth 2.0 flow. - This is necessary for API authentication between servers and non-human processes. - The current email/password method is unsuitable due to verification and MFA requirements. - There have been no comments or developments on this issue yet. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If there is no response, the issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8372