🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

firebaseoauth2

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebaseoauth2 - npm Package Compare versions

Comparing version

to
0.4.3

@@ -531,2 +531,18 @@ const express = require("express");

const getUidtByAccessToken = (access_token) => {
return new Promise(function(resolve, reject){
console.log('getClientByAccessToken', access_token)
const ref = FirebaseDb.ref('/oAuth/tokens/AccessTokens/' + access_token).once('value')
.then(function(snapshot){
if(snapshot.val()){
resolve(snapshot.val().uid)
}else{
reject()
}
},function(){
reject()
})
}
}
const getClientByRef = (ref) => {

@@ -538,4 +554,2 @@ console.log('getClientByRef')

if(snapshot.val()){
console.log(448, snapshot.val())
const value = snapshot.val()

@@ -547,3 +561,2 @@ const uid = value.uid

.then(function(client){
console.log(456, client)

@@ -590,4 +603,23 @@ resolve({

// utility
const getUserRecoad = (token) => {
return new Promise(function(resolve, reject){
getUidtByAccessToken(token)
.then(function(uid){
FirebaseAdmin.auth().getUser(uid)
.tmen(function(userRecord){
resolve(userRecord)
}, function(error){
reject(error)
})
})
})
}
const app.utility = {
getUserRecoad : getUserRecoad
}
module.exports = {
FirebaseOAuth2 : app
}
{
"name": "firebaseoauth2",
"version": "0.4.2",
"version": "0.4.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "indexjs.js",