FLUTTER ECOSYSTEM

CodeGather/flutter_ali_auth

알리바바 클라우드 일클릭 로그인은 원본과 유사한 매개변수 설정을 제공하며, 사용자 정의 UI 인터페이스를 지원합니다. 설정 효과는 예제 시연 이미지를 참조하세요. 플러그인이 도움이 되셨다면 작은 별을 켜 주시어 지원해 주세요.

flutter_ali_auth 프로젝트 이미지
Stars
192
Forks
86
최근 푸시(UTC)
2026. 7. 27.
프로젝트 상태
활성
21克的爱情 GitHub avatar
GITHUB User

21克的爱情 ↗

언어Objective-CDartJavaRubyHTMLSwiftKotlinShell

기술 주제

사용 중인 의존성

의존성 목록 6 개
  • flutter{"sdk":"flutter"}
  • flutter_web_plugins{"sdk":"flutter"}
  • plugin_platform_interface^2.1.8
  • js^0.7.2
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^6.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Pub example workflow example workflow example workflow

GitHub license GitHub issues GitHub forks GitHub stars GitHub size GitHub release

:large_blue_circle: 国际化

中文文档 | English

这是一个阿里云号码认证服务中的一键登录的插件

由于项目的其他功能都采用阿里云的服务,在一键登录的功能上也采用阿里云利于后期的更好维护。 本插件免费开源,高定制,如果在使用中有什么问题,欢迎反馈,如果觉得本插件还不够好可以提供您的宝贵意见, 如果你想在自己项目中定制,请将本插件clone为本地进行修改,但是通过本插件进行修改后发布其他版本的插件也欢迎, 但是在使用或者参考了本插件的思路或者相关内容,

请注明出处并且链接到本插件,谢谢您的配合。

v1.1.9版本同步更新阿里云的sdk升级,请注意升级,否则不能使用原来的密钥升级方案请参考 升级文档

<!-- 全屏时使用主题 android:theme="@android:style/Theme.NoTitleBar.Fullscreen" -->
<!-- 弹窗时使用主题 android:theme="@style/authsdk_activity_dialog" -->
<!-- 如果不需要使用窗口模式,不要使用authsdk_activity_dialog主题,会出现异常动画-->
<!-- 如果需要使用authsdk_activity_dialog主题,则screenOrientation一定不能指定明确的方向,
比如portrait、sensorPortrait,在8.0的系统上不允许窗口模式指定orientation,会发生crash,需要指定为behind,
然后在授权页的前一个页面指定具体的orientation-->

<!--协议页面webview-->
<activity
    android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    tools:replace="android:theme"
    android:exported="false"
    android:launchMode="singleTop"
    android:screenOrientation="behind"
    android:theme="@style/authsdk_activity_dialog" />

<!--联通电信授权页-->
<activity
    android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    tools:replace="android:configChanges"
    android:exported="false"
    android:launchMode="singleTop"
    android:screenOrientation="behind"
    android:theme="@style/authsdk_activity_dialog"/>

<!--移动授权页-->
<activity
    android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
    android:configChanges="orientation|keyboardHidden|screenSize"
    tools:replace="android:configChanges"
    android:exported="false"
    android:launchMode="singleTask"
    android:screenOrientation="behind"
    android:theme="@style/authsdk_activity_dialog" />

相关支持

平台 支持
Android YES
Ios YES

授权⻚点击事件响应码

响应码 响应码描述
700000 点击返回按钮,⽤户取消免密登录(android 物理按钮/虚拟返回按钮暂未实现)请自行使用flutter替代
700001 点击切换按钮,⽤户取消免密登录
700002 点击登录按钮事件
700003 点击check box事件
700004 点击协议富⽂本⽂字事件
700005 点击点击第三方按钮事件

步骤

注意事项

关于点击事件穿透问题

参考一 参考二

1、 针对移动闪退问题: 在示范工程,pods -> TARGETS -> ali_auth -> Build Settings -> Linking -> Other Linker Flags 里面加上 -ObjC(因为AuthSDK是通过pod依赖进去的,所有对应的target里面要加这个配置,不然移动网络会crash) 如下图所示:
cmcc_crash

2、该插件已添加ATAuthSDK.framework,在编译时请勿将ATAuthSDK.framework重复添加,以免出现未知错误 如下图所示添加的为错误操作
cmcc_crashcmcc_crash

实验安装

dependencies:
   ali_auth:
      git:
        url: https://github.com/CodeGather/flutter_ali_auth.git

DEMO截图

https://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/Screenshot_20220517_123128.jpghttps://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/Screenshot_20220517_120625.jpghttps://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/Screenshot_20220517_120629.jpghttps://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/Screenshot_20220517_120634.jpghttps://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/Screenshot_20220517_120649.jpg

演示

https://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/SVID_20220517_120504.gif

如果你觉得不错欢迎打赏

https://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/play_al.jpghttps://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/play_wx.jpg

知识星球

为了不浪费大家宝贵的时间,也迫于现实的压力,如果你想获取更优质的服务欢迎加入知识星球,提供的服务远比一杯咖啡更有性价比
https://raw.githubusercontent.com/CodeGather/flutter_ali_auth/master/screenshots/zsxq.png

关注趋势

Stargazers over time