GenAuth DocsDocuments
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
AgentAuth
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
User Guide
  • Quick Start

  • Authentication

    • Overview
    • Username Password Authentication
    • SMS Code Authentication
    • Social Login Authentication
    • QR Code Login

    • Authentication in Mini Programs
    • Implement Single Sign-On (SSO)
    • Mobile SSO
    • Multi-factor Authentication
    • Extend Authentication Process

    • Customize Login UI
  • Access Control

  • Authorization

  • Adaptive MFA

  • User Account Management

  • User Directory Management

  • Applications

  • Become a Federation Authentication Identity Provider

  • Connect External Identity Providers (IdP)

  • WeChat Ecosystem Full Scenario Capabilities

  • Migrate Users to GenAuth

  • Security Settings

  • Branding

  • Automation

  • Audit Logs

  • Setting

  • FAQ

  1. User Guide
  2. /
  3. Authentication
  4. /
  5. Social Login Authentication

¶ Use social login authentication

Update time: 2025-07-23 07:34:21
Edit

Social login refers to the process of users using social platform identity authentication information to authenticate and log in to third-party applications or websites. For example, people often use personal WeChat, QQ, Weibo and other social accounts to log in to Didi, NetEase Cloud Music, etc. Social login not only helps to simplify the user's login experience on third-party platforms, but also provides a simpler and more convenient way for users to create new accounts on third-party platforms. Whether for ordinary users or enterprises, social login has incomparable advantages.

¶ Social login list

GenAuth currently supports nearly 20 social logins at home and abroad, such as WeChat, GitHub, Sign in with Apple, Alipay, etc. The following is a complete list:

Social Login MethodUsage ScenarioDocumentation
PC WeChat QR CodePC WebsiteDocumentation
WeChat MobileMobile APPDocumentation
WeChat Web AuthorizationWeChat Web PageDocumentation
WeChat Official Account ScanningPC WebsiteDocumentation
WeChat Mini ProgramWeChat Mini ProgramDocumentation (opens new window)
WeChat PC Mini Program QR CodePC WebsiteDocumentation
WeChat Mini Program App LaunchMobile APPDocumentation
Tencent QQPC WebsiteDocumentation
Tencent QQ MobileMobile APPDocumentation
Sina WeiboPC WebsiteDocumentation
Sina Weibo MobileMobile APPDocumentation
GitHubPC WebsiteDocumentation
GitHub MobileMobile APPDocumentation
FacebookPC WebsiteDocumentation
Facebook MobileMobile APPDocumentation
TwitterPC WebsiteDocumentation
Twitter MobileMobile APPDocumentation
Google WebPC WebsiteDocumentation
Google MobileMobile APPDocumentation
Apple WebPC WebsiteDocumentation
Apple MobileMobile APPDocumentation
Alipay WebPC WebsiteDocumentation
Alipay MobileMobile APPDocumentation
SlackPC WebsiteDocumentation
Slack MobileMobile APPDocumentation
GiteePC WebsiteDocumentation
GitLabPC WebsiteDocumentation
GitLab MobileMobile APPDocumentation
BaiduPC WebsiteDocumentation
Baidu MobileMobile APPDocumentation
LinkedInPC WebsiteDocumentation
LinkedIn MobileMobile APPDocumentation
NetEase Yidun (One-click Login)Mobile APPDocumentation
QingCloudPC WebsiteDocumentation
InstagramPC WebsiteDocumentation
Douyin MobileMobile APPDocumentation
Douyin Mini ProgramMobile APPDocumentation (opens new window)
Kuaishou MobileMobile APPDocumentation
Xiaomi MobileMobile APPDocumentation
Line MobileMobile APPDocumentation

¶ Custom social login

GenAuth provides the ability to access custom OAuth2.0 identity providers. If you need to connect to a social login identity source that is not built into GenAuth, you can read this guide.

¶ WeChat solution

GenAuth has a complete solution for the WeChat ecosystem. You can view the product introduction (opens new window) and read the Guide to connecting to the WeChat account system.

¶ Choose the appropriate development access method

GenAuth Social login supports four access methods: Using JavaScript SDK, Using embedded login components, Using hosted login pages and Manually calling social login interfaces. Each different access method has its own advantages and disadvantages. You can choose the appropriate method according to your business needs.

¶ Pros and cons comparison

The following is a comparison of the pros and cons of various methods:

Access methodAdvantagesDisadvantagesRecommended
Use JavaScript SDK Easy access, only a few lines of code. Highest degree of customization. Yes
Use embedded login componentEasy access, only a few lines of code. You can integrate this component into your application. Relatively high degree of customizationYes
Use hosted login pageSimple operation and maintenance, which is handled by GenAuth. Each user pool has an independent second-level domain name.If you need to embed it in your application, you need to use the pop-up mode to log in, that is: after clicking the login button, a window will pop up with the login page hosted by GenAuth, or redirect the browser to the login page hosted by GenAuth.Yes
Manually call the social login interfaceYou need to manually parse the user information from the URL. Access is relatively complicated and troublesome.Not recommended

¶ Detailed access method

The following is the detailed access method for each method:

Select access method
使用 SDK
Loading...

Taking GitHub social login as an example, you only need to implement the following lines of code:

  • Initialize AuthenticationClient with the application ID. You can view the application ID on the application list page of the console.
  • Call the authenticationClient.social.authorize method, passing github as the first parameter, and specifying the onSuccess and onError callback functions as the second parameter.
  • After the user successfully logs in, you can get the user information in the onSuccess callback function; if the login fails, you can get the error code and error information in the onError callback function. For a complete list of error codes, see: Error Code List.
import { AuthenticationClient } from "authing-js-sdk";

const authenticationClient = new AuthenticationClient({
  appId: "GEN_AUTH_APP_ID",
  appHost: "https://xxx.genauth.ai",
});

// Sign in with GitHub
await authenticationClient.social.authorize("github", {
  onSuccess: (user) => {
    console.log(user);
  },
  onError: (code, message) => {},
});
Previous article: SMS Code Authentication Next article: QR Code Login
  • Social login list
  • Custom social login
  • WeChat solution
  • Choose the appropriate development access method

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.