Class: FirebaseApi
- Inherits:
-
Object
- Object
- FirebaseApi
- Defined in:
- lib/services/firebase_authenticatio.rb
Constant Summary collapse
- BASE_URL =
'https://identitytoolkit.googleapis.com/v1/accounts'
Class Method Summary collapse
Class Method Details
.sign_in(email, password) ⇒ Object
10 11 12 |
# File 'lib/services/firebase_authenticatio.rb', line 10 def self.sign_in(email, password) responce = HTTParty.post("#{BASE_URL}:signInWithPassword?key=#{ENV['FIREBASE_API_KEY']}", body: { email: email, password: password, returnSecureToken: true}) end |
.sign_up(email, password) ⇒ Object
6 7 8 |
# File 'lib/services/firebase_authenticatio.rb', line 6 def self.sign_up(email, password) responce = HTTParty.post("#{BASE_URL}:signUp?key=#{ENV['FIREBASE_API_KEY']}", body: { email: email, password: password}) end |