Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Guides
  • Quick start

  • Authenticate the user

    • Use account password authentication
    • Use SMS verification code authentication
    • Use social login authentication
    • Use scan code login authentication

    • Certify in Mini Program
    • Implement single sign-on (SSO)
    • Single sign-on on the mobile terminal
    • Multi-factor authentication (MFA)

    • Extend the authentication process

    • Personalize the guard
  • Authority management for users

  • Authorization

  • Manage user accounts

  • Manage User Directory

  • Management Application

  • Become a source of federal authentication identity

  • Connect to an external identity provider (IdP)

  • Open up WeChat ecology
  • Migrate users to Authing

  • Management organization

  • Expandable capabilities

  • Audit Log

  • Configure security information

  • Configure user pool information

  • Deployment plan

  • Frequently Asked Questions FAQs

  1. Guides
  2. /
  3. Authenticate the user
  4. /
  5. Use social login authentication

¶ Use social login authentication

Update Time: 2025-05-14 08:32:28
Edit

Social login refers to the process in which users use social platform identity authentication information to authenticate and log in to third-party applications or URLs. For example, people often use personal WeChat, QQ, Weibo and other social accounts to log in to Didi and NetEase Cloud Music. Social login not only helps 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. Both for normal users and enterprises, social login has unparalleled advantages.

¶ Social login list

Authing currently supports 4 social logins around the world, such as GitHub, Apple, etc. The following is a complete list:

Social Identity ProviderScenesDocs
WeChat QR Code on PCWebDocumentation
WeChat MobileMobile AppDocumentation
WeChat Web PageWechat BrowserDocumentation
Wechat Official Accounts QR CodeWebDocumentation
Mini ProgramMini ProgramDocumentation
Mini Program QR Code on PCWebDocumentation
Pull-up Mini Program on AppMobile AppDocumentation
QQWebDocumentation
WeiboWebDocumentation
GitHubWebDocumentation
FacebookWebDocumentation
TwitterWebDocumentation
GoogleWebDocumentation
Apple (Web)WebDocumentation
Apple (Mobile)Mobile AppDocumentation
AlipayMobile AppDocumentation
SlackWebDocumentation
GiteeWebDocumentation
GitLabWebDocumentation
BaiduWebDocumentation
LinkedInWebDocumentation
NetEase YIDUNMobile AppDocumentation
QingCloudWebDocumentation
InstagramWebDocumentation

¶ Custom social login

Authing provides the ability to integrate a custom OAuth2.0 identity provider. If you need to connect to a social login identity source that is not built in Authing, you can read this guide.

¶ Choose the appropriate development integration method

Authing social login supports four integration methods: JavaScript SDK, embedded login components, hosted login pages and manually calling the social login interface. Each different integration method has its own advantages and disadvantages. You can use your own business needs to choose the right way.

The following is a comparison of the advantages and disadvantages of various methods:

Integration methodAdvantagesDisadvantagesRecommend
JavaScript SDK Easy to integrate, only a few lines of code are required. The highest degree of customization is possible. Yes
embedded login componentsEasy to integrate, only a few lines of code are required. You can integrate this component into your application. Relatively high degree of customization.Yes
hosted login pagesOperation and maintenance are simple, and Authing is responsible for operation and maintenance. Each application has an independent second-level domain name.Cannot be embedded in your appYes
manually calling the social login interfaceYou need to manually parse the user information from the URL. Relatively complicated and troublesome.No

The following is the details of integration method for each method:

Method
使用 SDK
Loading...

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

  • Initialize the AuthenticationClient by application ID, and you can view the application ID on the application list page of the console.
  • Call the authenticationClient.social.authorize method, pass the first parameter into github, and the second parameter specifies the onSuccess and onError callback functions.
  • 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 complete error codes, please see: Error Code List.
import { AuthenticationClient } from 'authing-js-sdk'

const authenticationClient = new AuthenticationClient({
  appId: 'AUTHING_APP_ID',
  appHost: 'https://xxx.authing.cn',
})

// Log in with GitHub
await authenticationClient.social.authorize('github', {
  onSuccess: (user) => {
    console.log(user)
  },
  onError: (code, message) => {},
})
Prev: Use SMS verification code authentication Next: Use scan code login authentication
  • Social login list
  • Custom social login
  • Choose the appropriate development integration method

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.