Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bmw-token-manager

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bmw-token-manager - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

32

dist/cjs/refreshInstagramToken.js

@@ -15,13 +15,15 @@ 'use strict';

const refreshFacebookAccessToken = async (currentAccessToken, oauthOptions) => {
const response = await fetch("https://graph.facebook.com/v14.0/oauth/access_token", {
const baseUrl = "https://graph.facebook.com/v14.0/oauth/access_token";
const searchParams = new URLSearchParams({
grant_type: "fb_exchange_token",
client_id: oauthOptions.facebookClientId,
client_secret: oauthOptions.facebookClientSecret,
fb_exchange_token: currentAccessToken,
});
const url = `${baseUrl}?${searchParams.toString()}`;
const response = await fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
grant_type: "fb_exchange_token",
client_id: oauthOptions.facebookClientId,
client_secret: oauthOptions.facebookClientSecret,
fb_exchange_token: currentAccessToken,
}),
}
});

@@ -31,11 +33,13 @@ return await response.json();

const refreshInstagramLongLivedToken = async (longLivedToken) => {
const response = await fetch("https://graph.instagram.com/refresh_access_token", {
const baseUrl = "https://graph.instagram.com/refresh_access_token";
const searchParams = new URLSearchParams({
grant_type: "ig_refresh_token",
access_token: longLivedToken,
});
const url = `${baseUrl}?${searchParams.toString()}`;
const response = await fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
grant_type: "ig_refresh_token",
access_token: longLivedToken,
}),
}
});

@@ -42,0 +46,0 @@ return await response.json();

@@ -13,13 +13,15 @@ async function registerFetchAttempt(supabaseClient, activeTeamId) {

const refreshFacebookAccessToken = async (currentAccessToken, oauthOptions) => {
const response = await fetch("https://graph.facebook.com/v14.0/oauth/access_token", {
const baseUrl = "https://graph.facebook.com/v14.0/oauth/access_token";
const searchParams = new URLSearchParams({
grant_type: "fb_exchange_token",
client_id: oauthOptions.facebookClientId,
client_secret: oauthOptions.facebookClientSecret,
fb_exchange_token: currentAccessToken,
});
const url = `${baseUrl}?${searchParams.toString()}`;
const response = await fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
grant_type: "fb_exchange_token",
client_id: oauthOptions.facebookClientId,
client_secret: oauthOptions.facebookClientSecret,
fb_exchange_token: currentAccessToken,
}),
}
});

@@ -29,11 +31,13 @@ return await response.json();

const refreshInstagramLongLivedToken = async (longLivedToken) => {
const response = await fetch("https://graph.instagram.com/refresh_access_token", {
const baseUrl = "https://graph.instagram.com/refresh_access_token";
const searchParams = new URLSearchParams({
grant_type: "ig_refresh_token",
access_token: longLivedToken,
});
const url = `${baseUrl}?${searchParams.toString()}`;
const response = await fetch(url, {
method: "GET",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
grant_type: "ig_refresh_token",
access_token: longLivedToken,
}),
}
});

@@ -40,0 +44,0 @@ return await response.json();

{
"name": "bmw-token-manager",
"version": "1.2.1",
"version": "1.2.2",
"repository": "git@github.com:imbhargav5/bmw-token-manager.git",

@@ -5,0 +5,0 @@ "author": "Bhargav Ponnapalli <imbhargav5@gmail.com>",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc