Class: FirebaseApi

Inherits:
Object
  • Object
show all
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.(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.(email, password)
  responce = HTTParty.post("#{BASE_URL}:signUp?key=#{ENV['FIREBASE_API_KEY']}", body: { email: email, password: password})
end