@capawesome/capacitor-google-sign-in 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -85,6 +85,7 @@ No configuration required for this plugin.
85
85
 
86
86
  ```typescript
87
87
  import { GoogleSignIn } from '@capawesome/capacitor-google-sign-in';
88
+ import { Capacitor } from '@capacitor/core';
88
89
 
89
90
  const initialize = async () => {
90
91
  await GoogleSignIn.initialize({
@@ -103,6 +104,19 @@ const signIn = async () => {
103
104
  console.log(result.serverAuthCode);
104
105
  };
105
106
 
107
+ const handleRedirectCallback = async () => {
108
+ if (Capacitor.getPlatform() !== 'web') {
109
+ return;
110
+ }
111
+ const result = await GoogleSignIn.handleRedirectCallback();
112
+ console.log(result.idToken);
113
+ console.log(result.userId);
114
+ console.log(result.email);
115
+ console.log(result.displayName);
116
+ console.log(result.accessToken);
117
+ console.log(result.serverAuthCode);
118
+ };
119
+
106
120
  const signOut = async () => {
107
121
  await GoogleSignIn.signOut();
108
122
  };
@@ -33,7 +33,7 @@ android {
33
33
  buildTypes {
34
34
  release {
35
35
  minifyEnabled false
36
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
37
37
  }
38
38
  }
39
39
  lintOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/capacitor-google-sign-in",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Capacitor plugin to sign-in with Google.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",