【文件属性】:
文件名称:CapacitorGoogleAuth:用于Google Auth的电容器插件。 轻巧且无依赖
文件大小:715KB
文件格式:ZIP
更新时间:2021-02-03 12:12:24
android ios google web pwa
电容器GoogleAuth
Google Auth的电容插件。
安装
npm i --save @codetrix-studio/capacitor-google-auth
npx cap update
网页
将元标记添加到头部。
< meta name =" google-signin-client_id " content =" {your client id here} " >
通过导入注册插件。
import "@codetrix-studio/capacitor-google-auth" ;
用它
import { Plugins } from '@capacitor/core' ;
Plugins . GoogleAuth . signIn ( ) ;
AngularFire2
async googleSignIn ( ) {
let googleUser = await Plugins . GoogleAuth . signIn ( ) ;
const credential = auth . GoogleAuthProvider . credentia