🚀 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.2.7

@@ -239,7 +239,7 @@ const express = require("express");

getClientByAuthorizeCode(authorize_code)
.then(function(client){
console.log(239, client, client.client_secret, client_secret)
.then(function(clientInfo){
console.log(239, clientInfo)
if(client.client_secret == client_secret){
updateToken(client)
updateToken(clientInfo)
.then(function(token){

@@ -258,21 +258,23 @@ console.log(244, token)

const updateToken = (client) => {
console.log('updateToken', client)
const updateToken = (clientInfo) => {
console.log('updateToken', clientInfo)
return new Promise(function(resolve, reject){
let AccessToken
deleteAccessToken(client.access_token)
deleteAccessToken(clientInfo.client.access_token)
.then(function(){
return deleteRefreshToken(client.refresh_token)
return deleteRefreshToken(clientInfo.client.refresh_token)
})
.then(function(){
return deleteAuthorizeCode(client.authorize_code)
return deleteAuthorizeCode(clientInfo.client.authorize_code)
})
.then(function(){
return addAccessToken(client.uid, client.client_id)
return addAccessToken(clientInfo.uid, clientInfo.client_id)
})
.then(function(_AccessToken){
AccessToken = _AccessToken
return addRefreshToken(client.uid, client.client_id)
return addRefreshToken(clientInfo.uid, clientInfo.client_id)
})

@@ -393,3 +395,7 @@ .then(function(_RefreshToken){

.then(function(client){
resolve(client)
resolve({
uid : uid,
client_id : client_id,
client : client
})
}, function(){

@@ -396,0 +402,0 @@ reject()

{
"name": "firebaseoauth2",
"version": "0.2.6",
"version": "0.2.7",
"description": "",

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