Integrated OAuthApp unified login, custom login, open authorization function

OAuthApp is a front-end publishing tool for rapid development of front-end web projects and publishing to the server.
With the introduction of the script library, you can use the server-side API, customize the domain name, publish H5 online, and store the site data independently.

Original link: https://docs.oauthapp.com/code_usersystem.html

OAuthApp Unified Login

OAuthApp provides a unified login function, and developers can integrate login, registration, password retrieval and other functions into their own application systems through simple configuration. You can use the login link generation tool to preview the effect, and the parameter description of the unified login can be viewed in this document .

Mobile number login

1. Configure Alibaba Cloud AccessKey 1

2. Open the SMS service of Alibaba Cloud , and apply for the signature of the SMS service 3 and create the SMS template 4 

3. Open the application configuration 2  -  register, retrieve password

  • Fill in the signature name 3 approved by Alibaba Cloud  in the SMS signature 

  • Fill in the template CODE 4 approved by Alibaba Cloud into the registered account - SMS template, password recovery - SMS template  

  • Check the registered account - need to verify the mobile phone number and interface permissions

WeChat applet scan code login

1. Open the application configuration 2  -  OAuthApp unified login

  • Check Enable WeChat applet login , interface permissions

2. By default, the OAuthApp applet is used for authorized login, and steps 3 and 4 below can be ignored

3. If you need to use your own applet for authorized login, open the application configuration 2  -  WeChat applet

  • Fill in the official AppID of the WeChat Mini Program to the ClientID of the WeChat Mini Program 

  • Fill in the official AppSecret of the WeChat Mini Program into the ClientSecret of the WeChat Mini Program 

4. Mini-program end reference code

DingTalk login

1. Open the application configuration 2  -  DingTalk

2. Open the application configuration 2  -  OAuthApp unified login

  • Check Enable DingTalk login , interface permissions 

WebID login

1. Open the application configuration 2  -  OAuthApp unified login

  • Check Enable Web ID login , interface permissions 

No registration

In some cases, it may be desirable to prevent users from registering.

1. Open the application configuration 2  -  OAuthApp unified login

  • Check the prohibition of account registration and interface permissions 

Only allow third-party account login

In some scenarios, it may only be allowed to use the account of the third-party platform to log in, but does not provide account password login, email or mobile phone number login functions.

1. Open the application configuration 2  -  OAuthApp unified login

  • Check Disable system account login and interface permissions 

send welcome email

After the user registers successfully, the system automatically sends a welcome email to the user.

1. Activate the Alibaba Cloud email push service , configure the sending domain name , and set the sending address . 

2. Open the application configuration 2  - -  register, retrieve password

  • Configure Alibaba Cloud AccessKey 1
  • Fill in the sending address created by Alibaba Cloud to: the sending account of the mailbox
  • Tick ​​Register account - send welcome email 
  • Fill in the registration account - welcome email template 

custom development

If you need to add flexible custom development, you can refer to the following documents

Register an account

username

Use account and password to log in. The developer needs to pass in the user's account and password, and the server returns the user's access_token to the front end after successful verification.

development reference Link
document Check
API Check

Phone number

Users can log in with their mobile phone number. The developer needs to pass in the user's mobile phone number and verification code. After the server verifies successfully, it returns the user's access_token to the front end.

development reference Link
document Check
API Check

email address

Users can log in with their email accounts. The developer needs to pass in the user's email account and password. After the server verifies successfully, it returns the user's access_token to the front end.

development reference Link
document Check
API Check

Third-party UnionID

Users can log in through accounts on third-party platforms (such as WeChat, H5 web pages, QQ, Weibo, Facebook, GMail, Github and other third-party platforms). The developer needs to pass in the user's authentication information on the third-party platform. After the server verifies successfully, it returns the user's access_token to the front end.

development reference Link
document Check
API Check

Log in

username

Login with account password

development reference Link
document Check
API Check

Phone number

Login with mobile phone number and mobile phone verification code

development reference Link
document Check
API Check

email address

Login with email account and email verification code

development reference Link
document Check
API Check

Third-party UnionID

Login with third-party UnionID

development reference Link
document Check
API Check

retrieve password

Provide users with the function of retrieving forgotten passwords.

1. The developer needs to pass in the mobile phone number or email address submitted by the user to receive the verification code.

2. Enter the new password and the received verification code. After the verification is passed, the password reset is successful.

Retrieve password by mobile phone

development reference Link
document Check
API Check

Retrieve password by email

development reference Link
document Check
API Check

open up your user data

If you need to open user data to the outside world, you can refer to the following two methods:

Unified login with OAuthApp

The external application redirects the page to the OAuthApp unified login. After the user successfully logs in and confirms the authorization, the system returns the user's access_token to the external application.

1. Open App Configuration 2  -  Security

2. Fill in the URLs that are allowed to receive access_token to the white list of open authentication URLs (default or leave blank, which means no restrictions) 

Use open authentication interface

development reference Link
document Check
API Check

User Data Management

Using the OAuthApp publishing tool, the following operations such as user data import and export can be performed.

  • Query and edit user information
  • Set user roles
  • View user orders
  • Manage user access tokens
  • Import and export user data
  • clear user data

  1. Alibaba Cloud AccessKey: It is an identity token for using Alibaba Cloud services through API, and related services can only be used after being configured correctly. view document 

  2. Application configuration: Use the OAuthApp publishing tool to open the application details and application configuration panels in sequence.

  3. SMS signature specification: The signature of the SMS service needs to be reviewed, and the signature can only be used after the review is passed. view document 

  4. Short message template specification: The short message service template can only be used after being approved. view document 

  5. DingTalk application: enterprise internal application, specific configuration can be viewed in the document 

Website address: https://www.oauthapp.com/

Development documentation: https://docs.oauthapp.com/

Guess you like

Origin www.oschina.net/news/250914