The production-ready Medusa DTC Starter is outRead the announcement
A

Auth github

Github OAuth authentication provider for Medusa

Included in @medusajs/medusa, no separate install needed
Category
Built by
Version
2.22.4
Last updated
7 hours ago
Monthly downloads
Loading downloads

Medusa logo

@medusajs/auth-github

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

GitHub Auth Module Provider for Medusa: lets users and customers log in with their GitHub account through OAuth 2. Use it to add "Log in with GitHub" for customers, admin users, or custom actor types. It ships with and is registered through the path.

At a glance

Package
TypeModule Provider (Auth Module)
Provider ID
Registered by defaultNo
Import from

Installation

No installation needed. The provider is a dependency of .

Usage

Register the provider in the Auth Module's array in . Passing replaces the default list, so keep if you still need email/password login:

The provider's is the one used in authentication routes, such as .

Configuration

OptionTypeDescriptionDefault
Required. The OAuth client ID of your GitHub app.-
Required. The OAuth client secret of your GitHub app.-
Required. The URL GitHub redirects to after authentication. Can be overridden per request with a body parameter.-
Environment variableDescription
Value for , as used in the example above.
Value for , as used in the example above.
Value for , as used in the example above.

Resources