Skip to content

The Flutter plugin for Signing In with HUAWEI ID (on HarmonyOS)

License

Notifications You must be signed in to change notification settings

HarmonyCandies/sign_in_with_huawei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sign_in_with_huawei

用于 HarmonyOS 上华为账号登录的 Flutter 插件

安装

flutter pub add sign_in_with_huawei

或者将其添加到你的 pubspec.yaml 文件中

dependencies:
    sign_in_with_huawei: ^0.0.1

前提条件

在开始之前,请先阅读 开发准备华为账号登录(获取UnionID/OpenID)

使用方法

final response = await SignInWithHuawei.instance.authById(
  forceLogin: true,
  state: "any state",
  nonce: "any nonce",
  idTokenAlg: IdTokenSignAlgorithm.PS256,
);

print(response);
// response.state
// response.authCode
// response.idToken
// response.openID
// response.unionID

限制

当前插件仅实现了 华为账号登录(获取UnionID/OpenID)

华为账号一键登录(获取手机号和UnionID/OpenID) 尚未实现,欢迎 PR

About

The Flutter plugin for Signing In with HUAWEI ID (on HarmonyOS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published