motion-firebase 3.1.8 → 3.2.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.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/firebase/firebase_auth.rb +13 -0
- data/lib/firebase/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7916878369e5e493e2874e725c8d5e89635ba78
|
4
|
+
data.tar.gz: fa02c1e1c8e4c11b3dfef0bb26de4984aa9254c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60af8daccc616c662025cc7bb2ae4072db4e3ab1e7165e51ef01be3fb16b11c426eaadd594ce1ab3a752a091fff6f0fb48e89758ed016763d3df7769237ed7e1
|
7
|
+
data.tar.gz: 1de7b9df7bf2e79620a297c886162d6664824cb65adb8e2ecf5c91f09f94c9ffdab6912f32f97e9cc0cf88c69e01facc22c26f837c3c431c8ccf7242347af285
|
data/README.md
CHANGED
@@ -351,6 +351,7 @@ Firebase.remove_user(email: 'hello@example.com', password: '12345') { |error, au
|
|
351
351
|
Firebase.login(email: 'hello@example.com', password: '12345') { |error, auth_data| }
|
352
352
|
Firebase.login_anonymously { |error, auth_data| }
|
353
353
|
Firebase.update_user(email: 'hello@example.com', old_password: '12345', new_password: '54321') { |error, success| }
|
354
|
+
Firebase.update_user_email(email: 'hello@example.com', password: '12345', new_email: 'hellp2@example.com') { |error, success| }
|
354
355
|
|
355
356
|
auth_data.uid # is a globally unique user identifier
|
356
357
|
auth_data.token # can be stored (in a keychain!) to authenticate the same user again later
|
@@ -118,6 +118,19 @@ class Firebase
|
|
118
118
|
changePasswordForUser(email, fromOld: old_password, toNew: new_password, withCompletionBlock: block)
|
119
119
|
end
|
120
120
|
|
121
|
+
def self.update_user_email(credentials, &block)
|
122
|
+
Firebase.new.update_user_email(credentials, &block)
|
123
|
+
end
|
124
|
+
def update_user_email(credentials, &block)
|
125
|
+
raise ":email is required in #{__method__}" unless credentials.key?(:email)
|
126
|
+
raise ":password is required in #{__method__}" unless credentials.key?(:password)
|
127
|
+
raise ":new_email is required in #{__method__}" unless credentials.key?(:new_email)
|
128
|
+
email = credentials[:email]
|
129
|
+
password = credentials[:password]
|
130
|
+
new_email = credentials[:new_email]
|
131
|
+
changeEmailForUser(email, password: password, toNewEmail: new_email, withCompletionBlock: block)
|
132
|
+
end
|
133
|
+
|
121
134
|
def self.send_password_reset(credentials, &block)
|
122
135
|
Firebase.new.send_password_reset(credentials, &block)
|
123
136
|
end
|
data/lib/firebase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-firebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin T.A. Gray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Adds more rubyesque methods to the built-in classes.
|