{"_id":"@achernykh/capacitor-google-auth","_rev":"2-71174d384c4230001fd480eb812480a2","name":"@achernykh/capacitor-google-auth","dist-tags":{"latest":"2.1.4"},"versions":{"2.1.3":{"name":"@achernykh/capacitor-google-auth","version":"2.1.3","description":"Google Auth plugin for capacitor.","main":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"build":"npm run clean && tsc","clean":"rm -rf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"author":{"name":"CodetrixStudio"},"license":"MIT","dependencies":{"@capacitor/core":"=2.4.6"},"devDependencies":{"@capacitor/android":"=2.4.3","@capacitor/ios":"=2.4.3","@types/gapi":"0.0.36","@types/gapi.auth2":"0.0.50","typescript":"^3.2.4"},"keywords":["capacitor","plugin","native","google","auth","firebase","angular","vue","react","ionic"],"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"type":"git","url":"git+https://github.com/CodetrixStudio/CapacitorGoogleAuth.git"},"bugs":{"url":"https://github.com/CodetrixStudio/CapacitorGoogleAuth.git/issues"},"gitHead":"40b999f22a799fcca8ccf4bc4ca716a6de05c419","homepage":"https://github.com/CodetrixStudio/CapacitorGoogleAuth#readme","_id":"@achernykh/capacitor-google-auth@2.1.3","_nodeVersion":"14.17.3","_npmVersion":"7.19.1","dist":{"integrity":"sha512-ttaIx+vvJVyVdxnEsQUm28OHfxzOT71KzAxNato3UKJMJQDgjaWDbBmI0IL+dQ3tvZxwOFm495DZJeYG37YtUQ==","shasum":"35dffd3409754622d12b7c118e0aeabf49793879","tarball":"https://registry.npmjs.org/@achernykh/capacitor-google-auth/-/capacitor-google-auth-2.1.3.tgz","fileCount":44,"unpackedSize":120708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8DDDCRA9TVsSAnZWagAAedIP/jlkJh0rG4NlS+YhOwMr\nzNLU9F5m9rPfFNWIf18MGps7jwzcPu+4e6QZBwnZbiuPUhCNwLRKWknTrKp+\nrqZy2+a+adLwVTCHkQo6of9B/GcIERWWCOiS2rnIPLBCLURsX21JpYhDf/AA\nTMxYBMPGw0oPeQXluDrEseZhI654hNw2YMSex3946ULB1EaJhDKbDRDAHAPt\nHiC9as8khCGJ6E/EaGddRGXdE4N7q1DVb/L5yzrgn8J9WUrCXTW3TJFsJujh\nUjDZYZuyhHHsbzc1Ad7XQ5jD9jWSOXKh5YbmLzshWJ3uHJF7xI9fZQ4ZRjKB\nCE+7rqAvogRo9QMoXrkVc5NNyKm+/sFgjAK+c0EBeZ/Y9rVHoWtPShXtuVg1\nHPhHzHEFD+5ypRzUWKxT+NtDjivjB9hON2WQGjwTzl2AmCKHT6mr1CLMaBqI\nkYC//yBfxOeFF92uFFVaKVfMjOPzx7jPuuB+HlrxCCYpQr+S+3JgGScb2M07\nmIkXFuGn60qfGkxjU8C7oxI3OZ1EsGM84+ZwYvXUzilGxeGi7Nt1er5nnjbw\nLMAKr9xZsMqSC7MesMZcwNgOzG/g/u8Zpg5bIO8JjRe6GSxg8XpR8YHQgxuN\n5X5LeloheiLnqv9bJmEIcSJWRQwS571khk6gL7Zn6zxW1GGC+LMSW8gby3s5\nQCAr\r\n=5HgA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxDmY+50aGcKc3wgXBbQm8eoSMmpUwykGhmEYNim37zQIhAKipUqCHlyx/izQwC9YZCnpmH7BJdRBFGRV1cPNvm3n4"}]},"_npmUser":{"name":"achernykh","email":"chernykh@me.com"},"directories":{},"maintainers":[{"name":"achernykh","email":"chernykh@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/capacitor-google-auth_2.1.3_1626353859627_0.6755855350098854"},"_hasShrinkwrap":false},"2.1.4":{"name":"@achernykh/capacitor-google-auth","version":"2.1.4","description":"Google Auth plugin for capacitor.","main":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"build":"npm run clean && tsc","clean":"rm -rf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"author":{"name":"CodetrixStudio"},"license":"MIT","dependencies":{"@capacitor/core":"=2.4.6"},"devDependencies":{"@capacitor/android":"=2.4.3","@capacitor/ios":"=2.4.3","@types/gapi":"0.0.36","@types/gapi.auth2":"0.0.50","typescript":"^3.2.4"},"keywords":["capacitor","plugin","native","google","auth","firebase","angular","vue","react","ionic"],"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"type":"git","url":"git+https://github.com/CodetrixStudio/CapacitorGoogleAuth.git"},"bugs":{"url":"https://github.com/CodetrixStudio/CapacitorGoogleAuth.git/issues"},"gitHead":"40b999f22a799fcca8ccf4bc4ca716a6de05c419","homepage":"https://github.com/CodetrixStudio/CapacitorGoogleAuth#readme","_id":"@achernykh/capacitor-google-auth@2.1.4","_nodeVersion":"14.17.3","_npmVersion":"7.19.1","dist":{"integrity":"sha512-9RPK/274xDsE2QwOSnJQzIh/DsciRgvyExS4g31Wag3/dO4A9Q1pKqJEBs+9O8KmXMflfD4PjWzvl+EnGIUIcA==","shasum":"6eaa98e992ed12f246ebd64f1a4e2074b7a9b0ea","tarball":"https://registry.npmjs.org/@achernykh/capacitor-google-auth/-/capacitor-google-auth-2.1.4.tgz","fileCount":44,"unpackedSize":120698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9TzhCRA9TVsSAnZWagAAUMsP/1WEk+RMYefjuwmflk71\njFF0Ntk+2rOl/wg3RWhdHH9kHHyWZPvVixn3eA4niY2NguLzsMoPyocmJoVn\nUvZj5ZkOo1VxKfHI92Jh2EKs1gnaEmZ//1eRDISAHuig25HAlnZg7qCNYx/N\nuc3tSHDBWFR8vtwVpMc3dtaFQy+zxVAZgvOJLK67AiHnCOXEo91fxVrY3+Z2\nCa3TxmFGLUhlLycc7g7H5/7lVJLOsa1dvt0cjXU5LfXeTb1zYLufnRBbOdmW\nTp0jiIk2URpRxktZy3rb4wa8UOSXmjcLfAjua5Tdwmnmwnja43u5ufVpRnar\nVOrM629PAPQMeQAK20ZgqRBPLSU+ldkuyK18xsB+NYcAqnzdKmQoyzNzryTF\no44bqkA5HtD5danaGyaZE6f7k85DsaAAPfJkU0Ap1v89UYWv+8D3llIxhN6A\n1Ez7/XdCIxbsgNbhNFcRpHc1lPuYQhqFW0SlKvjbjY6YjxvkC/DjgfmKKXYx\nOOM512tvzbJrCybwXKEirc/4/nGOo9YXMgmKcPlRNb9m0bjHKKnKDnXxghQn\nkMdD5q1xyID+WmndjMsbSJkYwmqVvt8FzeFL+a+TYwEIxHvpm/V5dv3TrF9A\nrYBQmDQPeSQHjP4VEJa9fpxV+17XAkij5B5q4hSrvGXpmRIkdE0YTfUbF3iF\ncTGN\r\n=JAzl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzb1rENOOqmarbQEWxGIHOYvSSH91PCLI2Xxl04y2tlAIgf3Nz+DFVULVSgh5h7x1hJWg76FJHSsgj/AMk766w6xc="}]},"_npmUser":{"name":"achernykh","email":"chernykh@me.com"},"directories":{},"maintainers":[{"name":"achernykh","email":"chernykh@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/capacitor-google-auth_2.1.4_1626684640951_0.6944010662581248"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-15T12:57:39.580Z","2.1.3":"2021-07-15T12:57:39.997Z","modified":"2022-04-04T11:10:51.922Z","2.1.4":"2021-07-19T08:50:41.147Z"},"maintainers":[{"name":"achernykh","email":"chernykh@me.com"}],"description":"Google Auth plugin for capacitor.","homepage":"https://github.com/CodetrixStudio/CapacitorGoogleAuth#readme","keywords":["capacitor","plugin","native","google","auth","firebase","angular","vue","react","ionic"],"repository":{"type":"git","url":"git+https://github.com/CodetrixStudio/CapacitorGoogleAuth.git"},"author":{"name":"CodetrixStudio"},"bugs":{"url":"https://github.com/CodetrixStudio/CapacitorGoogleAuth.git/issues"},"license":"MIT","readme":"# CapacitorGoogleAuth\nCapacitor plugin for Google Auth.\n\n### Install\n```bash\nnpm i --save @codetrix-studio/capacitor-google-auth\n\nnpx cap update\n```\n\n### WEB\nAdd [`clientId`](https://developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id) meta tag to head.\n```html\n<meta name=\"google-signin-client_id\" content=\"{your client id here}\">\n```\n\nRegister the plugin by importing it.\n```ts\nimport \"@codetrix-studio/capacitor-google-auth\";\n```\n\nUse it\n```ts\nimport { Plugins } from '@capacitor/core';\nPlugins.GoogleAuth.signIn();\n```\n\n\n\n### AngularFire2\n```ts\nasync googleSignIn() {\n  let googleUser = await Plugins.GoogleAuth.signIn();\n  const credential = auth.GoogleAuthProvider.credential(googleUser.authentication.idToken);\n  return this.afAuth.auth.signInAndRetrieveDataWithCredential(credential);\n}\n```\n\n### iOS\nMake sure you have `GoogleService-Info.plist` with `CLIENT_ID`\n\nAdd `REVERSED_CLIENT_ID` as url scheme to `Info.plist`\n\n### Android\nInside your `strings.xml`\n```xml\n<resources>\n  <string name=\"server_client_id\">Your Web Client Key</string>\n</resources>\n```\n\nImport package inside your `MainActivity`\n```java\nimport com.codetrixstudio.capacitor.GoogleAuth.GoogleAuth;\n```\n\nRegister plugin inside your `MainActivity.onCreate`\n```java\nthis.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{\n  add(GoogleAuth.class);\n}});\n```\n\n### Configure\nProvide configuration in root `capacitor.config.json`\n```json\n{\n  \"plugins\": {\n    \"GoogleAuth\": {\n      \"scopes\": [\"profile\", \"email\"],\n      \"serverClientId\": \"xxxxxx-xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com\",\n      \"forceCodeForRefreshToken\" : true\n    }\n  }\n}\n\n```\n\nNote : `forceCodeForRefreshToken` force user to select email address to regenerate AuthCode used to get a valid refreshtoken (work on iOS and Android) (This is used for offline access and serverside handling)\n","readmeFilename":"README.md"}