English | 中文
- Introduction
- Preparing the Environments
- Getting Started
- Sample Code
- Result
- Question or issues
- License
- Remarks
Most apps need to identify and authenticate users to tailor the app experience for individual users. However, building such a system from scratch is a difficult process. Auth Service can quickly build a secure and reliable user authentication system for your app. You only need to access Auth Service capabilities in your app without caring about the facilities and implementation on the cloud.
- A computer with Huawei QuickApp IDE
- A device can run QuickApp
Before running the auth quickstart, you need to:
- If you do not have a HUAWEI Developer account, you need to register an account and pass identity verification.
- Use your account to sign in to AppGallery Connect, create a project and add an app, set app platform to Quick App, set app category to App.
- Select your project and app in My projects, and go to Build > Auth Service to enable the Authentication service.
- Select Project Settings,and go to Manage APIs, enable the Auth Service.
- Go to General information, download the agconnect-services.json file from AppGallery Connect, replace agconnect-services.json in this demo with agconnect-services.json file.
- Select your project and app in My projects, and go to Build > Auth Service > Authentication mode, enable Mobile number, Email address, Huawei account, Anonymous account.
- Run the following code in terminal in the demo path, and demo will start.
# install dependencies npm install # install AGC auth sdk npm install @agconnect/auth@1.3.1 --save # run demo Ctrl+Shift+R
- More details about Auth
Sample code: src\Auth\auth.ux
If you have questions about how to use AppGallery Connect Demos, try the following options:
- Stack Overflow is the best place for any programming questions. Be sure to tag your question with
AppGallery
. - Huawei Developer Forum AppGallery Module is great for general questions, or seeking recommendations and opinions.
If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.
auth quickstart is licensed under the Apache License, version 2.0.
##Remarks When you create a serverless fast app with the Huawei fast application IDE, the directory structure of this demo corresponds to the client directory of serverless fast app.