cordova-plugin-firebase-authentication 7.0.0 → 9.0.0

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.
@@ -1,3 +1,4 @@
1
1
  # These are supported funding model platforms
2
2
 
3
+ github: chemerisuk
3
4
  custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FYAALBP25DP2G&source=url
package/Package.swift ADDED
@@ -0,0 +1,26 @@
1
+ // swift-tools-version:5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "cordova-plugin-firebase-authentication",
6
+ platforms: [.iOS(.v15)],
7
+ products: [
8
+ .library(name: "cordova-plugin-firebase-authentication", targets: ["FirebaseAuthenticationPlugin"])
9
+ ],
10
+ dependencies: [
11
+ .package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
12
+ .package(url: "https://github.com/firebase/firebase-ios-sdk.git", exact: "$IOS_FIREBASE_SDK_VERSION")
13
+ ],
14
+ targets: [
15
+ .target(
16
+ name: "FirebaseAuthenticationPlugin",
17
+ dependencies: [
18
+ .product(name: "Cordova", package: "cordova-ios"),
19
+ .product(name: "FirebaseAuth", package: "firebase-ios-sdk")
20
+ ],
21
+ path: "src/ios",
22
+ resources: [],
23
+ publicHeadersPath: "."
24
+ )
25
+ ]
26
+ )
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cordova plugin for [Firebase Authentication](https://firebase.google.com/docs/auth/)
2
2
 
3
- [![NPM version][npm-version]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![NPM total downloads][npm-total-downloads]][npm-url] [![Twitter][twitter-follow]][twitter-url]
3
+ [![NPM version][npm-version]][npm-url] [![NPM downloads][npm-downloads]][npm-url] [![NPM total downloads][npm-total-downloads]][npm-url] [![GitHub sponsor](https://img.shields.io/static/v1?label=sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/chemerisuk) [![Twitter][twitter-follow]][twitter-url]
4
4
 
5
5
  | [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)][donate-url] | Your help is appreciated. Create a PR, submit a bug or just grab me :beer: |
6
6
  |-|-|
@@ -54,11 +54,11 @@
54
54
 
55
55
  cordova plugin add cordova-plugin-firebase-authentication
56
56
 
57
- Use variables `IOS_FIREBASE_POD_VERSION` and `ANDROID_FIREBASE_BOM_VERSION` to override dependency versions for Firebase SDKs:
57
+ Use variables `IOS_FIREBASE_SDK_VERSION` and `ANDROID_FIREBASE_BOM_VERSION` to override dependency versions for Firebase SDKs:
58
58
 
59
59
  $ cordova plugin add cordova-plugin-firebase-authentication \
60
- --variable IOS_FIREBASE_POD_VERSION="9.3.0" \
61
- --variable ANDROID_FIREBASE_BOM_VERSION="30.3.1"
60
+ --variable IOS_FIREBASE_SDK_VERSION="12.19.1" \
61
+ --variable ANDROID_FIREBASE_BOM_VERSION="34.19.0"
62
62
 
63
63
  To use phone number authentication on iOS, your app must be able to receive silent APNs notifications from Firebase. For iOS 8.0 and above silent notifications do not require explicit user consent and is therefore unaffected by a user declining to receive APNs notifications in the app. Thus, the app does not need to request user permission to receive push notifications when implementing Firebase phone number auth.
64
64
 
@@ -275,6 +275,11 @@ ___
275
275
 
276
276
  Uses Apples's <code>idToken</code> and <code>rawNonce</code> to sign-in into firebase account. For getting _idToken_ (_rawNonce_ is optional) you can use `cordova-plugin-sign-in-with-apple` (or any other cordova plugin for Apple Sign-In).
277
277
 
278
+ **`See`**
279
+
280
+ - https://firebase.google.com/docs/auth/android/apple
281
+ - https://firebase.google.com/docs/auth/ios/apple
282
+
278
283
  **`Example`**
279
284
 
280
285
  ```ts
@@ -395,6 +400,11 @@ ___
395
400
 
396
401
  Uses Google's <code>idToken</code> and <code>accessToken</code> to sign-in into firebase account.
397
402
 
403
+ **`See`**
404
+
405
+ - https://firebase.google.com/docs/auth/android/google-signin
406
+ - https://firebase.google.com/docs/auth/ios/google-signin
407
+
398
408
  **`Example`**
399
409
 
400
410
  ```ts
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ module.exports = function(context) {
7
+ const opts = context.opts || {};
8
+ const pluginId = opts.plugin && opts.plugin.id;
9
+ const iosPlatformPath = path.join(opts.projectRoot, 'platforms', 'ios');
10
+
11
+ const iosJsonPath = path.join(iosPlatformPath, 'ios.json');
12
+ const iosJson = JSON.parse(fs.readFileSync(iosJsonPath, 'utf8'));
13
+ const pluginVariables = iosJson.installed_plugins[pluginId] || {};
14
+
15
+ const packagePaths = [
16
+ path.join(opts.plugin.dir, 'Package.swift'),
17
+ path.join(iosPlatformPath, 'packages', pluginId, 'Package.swift')
18
+ ];
19
+
20
+ packagePaths.forEach(packagePath => {
21
+ if (!fs.existsSync(packagePath)) return;
22
+
23
+ let content = fs.readFileSync(packagePath, 'utf8');
24
+
25
+ for (const varName in pluginVariables) {
26
+ content = content.replaceAll(`$${varName}`, pluginVariables[varName]);
27
+ }
28
+
29
+ fs.writeFileSync(packagePath, content, 'utf8');
30
+ });
31
+ };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "cordova-plugin-firebase-authentication",
3
- "version": "7.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "Cordova plugin for Firebase Authentication",
5
+ "types": "./types/index.d.ts",
5
6
  "cordova": {
6
7
  "id": "cordova-plugin-firebase-authentication",
7
8
  "platforms": [
package/plugin.xml CHANGED
@@ -1,7 +1,7 @@
1
1
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
2
2
  xmlns:android="http://schemas.android.com/apk/res/android"
3
3
  id="cordova-plugin-firebase-authentication"
4
- version="7.0.0">
4
+ version="9.0.0">
5
5
 
6
6
  <name>cordova-plugin-firebase-authentication</name>
7
7
  <description>Cordova plugin for Firebase Authentication</description>
@@ -20,8 +20,8 @@ xmlns:android="http://schemas.android.com/apk/res/android"
20
20
  <engine name="cordova-ios" version=">=6.0.0"/>
21
21
  </engines>
22
22
 
23
- <platform name="ios">
24
- <preference name="IOS_FIREBASE_POD_VERSION" default="9.3.0" />
23
+ <platform name="ios" package="swift">
24
+ <preference name="IOS_FIREBASE_SDK_VERSION" default="12.19.1" />
25
25
 
26
26
  <config-file target="config.xml" parent="/*">
27
27
  <feature name="FirebaseAuthentication">
@@ -38,13 +38,13 @@ xmlns:android="http://schemas.android.com/apk/res/android"
38
38
  <source url="https://cdn.cocoapods.org/"/>
39
39
  </config>
40
40
  <pods use-frameworks="true">
41
- <pod name="Firebase/Auth" spec="$IOS_FIREBASE_POD_VERSION" />
41
+ <pod name="Firebase/Auth" spec="$IOS_FIREBASE_SDK_VERSION" nospm="true"/>
42
42
  </pods>
43
43
  </podspec>
44
44
  </platform>
45
45
 
46
46
  <platform name="android">
47
- <preference name="ANDROID_FIREBASE_BOM_VERSION" default="30.3.1" />
47
+ <preference name="ANDROID_FIREBASE_BOM_VERSION" default="34.19.0" />
48
48
 
49
49
  <config-file target="res/xml/config.xml" parent="/*">
50
50
  <feature name="FirebaseAuthentication">
@@ -56,10 +56,10 @@ xmlns:android="http://schemas.android.com/apk/res/android"
56
56
  <config-file target="config.xml" parent="/*">
57
57
  <preference name="AndroidXEnabled" value="true" />
58
58
  <preference name="GradlePluginGoogleServicesEnabled" value="true" />
59
- <preference name="GradlePluginGoogleServicesVersion" value="4.3.13" />
59
+ <preference name="GradlePluginGoogleServicesVersion" value="4.4.0" />
60
60
  </config-file>
61
61
 
62
- <dependency id="cordova-support-android-plugin" version="~2.0.3"/>
62
+ <dependency id="cordova-support-android-plugin" version="~2.0.4"/>
63
63
 
64
64
  <framework src="platform('com.google.firebase:firebase-bom:$ANDROID_FIREBASE_BOM_VERSION')" />
65
65
  <framework src="com.google.firebase:firebase-auth" />
@@ -1,6 +1,5 @@
1
- #import <Cordova/CDV.h>
2
-
3
- @import FirebaseAuth;
1
+ #import <Cordova/Cordova.h>
2
+ #import <FirebaseAuth/FirebaseAuth.h>
4
3
 
5
4
  @interface FirebaseAuthenticationPlugin : CDVPlugin
6
5
 
@@ -1,6 +1,7 @@
1
1
  #import "FirebaseAuthenticationPlugin.h"
2
2
 
3
3
  @import FirebaseCore;
4
+ @import FirebaseAuth;
4
5
 
5
6
  @implementation FirebaseAuthenticationPlugin
6
7
 
@@ -76,6 +76,9 @@ export function signInAnonymously(): Promise<void>;
76
76
  * @param {string} accessToken Google Access token
77
77
  * @returns {Promise<void>} Callback when operation is completed
78
78
  *
79
+ * @see https://firebase.google.com/docs/auth/android/google-signin
80
+ * @see https://firebase.google.com/docs/auth/ios/google-signin
81
+ *
79
82
  * @example
80
83
  * // Below we use cordova-plugin-googleplus to trigger Google Login UI
81
84
  * window.plugins.googleplus.login({
@@ -120,6 +123,9 @@ export function signInWithTwitter(token: string, secret: string): Promise<void>;
120
123
  * @param {string} rawNonce Apple's raw token string
121
124
  * @returns {Promise<void>} Callback when operation is completed
122
125
  *
126
+ * @see https://firebase.google.com/docs/auth/android/apple
127
+ * @see https://firebase.google.com/docs/auth/ios/apple
128
+ *
123
129
  * @example
124
130
  * // below we use cordova-plugin-sign-in-with-apple to trigger Apple Login UI
125
131
  * cordova.plugins.SignInWithApple.signin({
@@ -133,6 +133,9 @@ exports.signInWithGoogle =
133
133
  * @param {string} accessToken Google Access token
134
134
  * @returns {Promise<void>} Callback when operation is completed
135
135
  *
136
+ * @see https://firebase.google.com/docs/auth/android/google-signin
137
+ * @see https://firebase.google.com/docs/auth/ios/google-signin
138
+ *
136
139
  * @example
137
140
  * // Below we use cordova-plugin-googleplus to trigger Google Login UI
138
141
  * window.plugins.googleplus.login({
@@ -195,6 +198,9 @@ exports.signInWithApple =
195
198
  * @param {string} rawNonce Apple's raw token string
196
199
  * @returns {Promise<void>} Callback when operation is completed
197
200
  *
201
+ * @see https://firebase.google.com/docs/auth/android/apple
202
+ * @see https://firebase.google.com/docs/auth/ios/apple
203
+ *
198
204
  * @example
199
205
  * // below we use cordova-plugin-sign-in-with-apple to trigger Apple Login UI
200
206
  * cordova.plugins.SignInWithApple.signin({