Skip to content

Add DingTalk provider #607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

naokij
Copy link

@naokij naokij commented May 12, 2025

Description

This PR adds OAuth2 authentication support for DingTalk. DingTalk is an enterprise collaboration and communication platform developed by Alibaba Group and is widely used in China.

Main Features

  • Supports the standard OAuth2 authentication process.
  • Supports company ID verification (optional).
  • Supports token refresh.
  • Provides detailed documentation and examples.
  • Adds comprehensive testing.

Configuration Example

dingTalkProvider := dingtalk.New(
    os.Getenv("DINGTALK_KEY"), 
    os.Getenv("DINGTALK_SECRET"), 
    "http://localhost:3000/auth/dingtalk/callback", 
    os.Getenv("DINGTALK_CORP_ID"), // Used for company verification. Can be set as an empty string if not needed.
    "openid", 
    "corpid" // Must be included in the scope when company verification is required.
)
goth.UseProviders(dingTalkProvider)

Testing

Test cases have been added to cover the main functions.

Related Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant