diff --git a/packages/facebook-oauth/CHANGELOG.md b/packages/facebook-oauth/CHANGELOG.md index b492fe1f09..b60213a892 100644 --- a/packages/facebook-oauth/CHANGELOG.md +++ b/packages/facebook-oauth/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog -## 1.12.0 - UNRELEASED +## 1.11.3 - 2023-08-16 +### Changes +- Updated default version of Facebook GraphAPI to v17 + +## 1.11.2 - 2022-12-07 +### Changes +- Updated internal code to use new Meteor async format from Meteor 2.9 + +## 1.11.1 - 2022-11-14 ### Changes - Updated default version of Facebook GraphAPI to v15 diff --git a/packages/facebook-oauth/facebook_client.js b/packages/facebook-oauth/facebook_client.js index 582d63bf04..eb05c565b6 100644 --- a/packages/facebook-oauth/facebook_client.js +++ b/packages/facebook-oauth/facebook_client.js @@ -30,7 +30,7 @@ Facebook.requestCredential = (options, credentialRequestCompleteCallback) => { const loginStyle = OAuth._loginStyle('facebook', config, options); - const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '15.0'; + const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '17.0'; let loginUrl = `https://www.facebook.com/v${API_VERSION}/dialog/oauth?client_id=${config.appId}` + diff --git a/packages/facebook-oauth/facebook_server.js b/packages/facebook-oauth/facebook_server.js index d9c824f27f..9952e58b2a 100644 --- a/packages/facebook-oauth/facebook_server.js +++ b/packages/facebook-oauth/facebook_server.js @@ -2,7 +2,7 @@ Facebook = {}; import crypto from 'crypto'; import { Accounts } from 'meteor/accounts-base'; -const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '13.0'; +const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '17.0'; Facebook.handleAuthFromAccessToken = async (accessToken, expiresAt) => { // include basic fields from facebook diff --git a/packages/facebook-oauth/package.js b/packages/facebook-oauth/package.js index 98b393d2a9..5845188323 100644 --- a/packages/facebook-oauth/package.js +++ b/packages/facebook-oauth/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Facebook OAuth flow", - version: '1.11.2' + version: '1.11.3' }); Package.onUse(api => { diff --git a/packages/oauth/oauth_client.js b/packages/oauth/oauth_client.js index 0ff507e761..e406f02d8c 100644 --- a/packages/oauth/oauth_client.js +++ b/packages/oauth/oauth_client.js @@ -97,19 +97,20 @@ OAuth.getDataAfterRedirect = () => { }; }; -// Launch an OAuth login flow. For the popup login style, show the -// popup. For the redirect login style, save the credential token for -// this login attempt in the reload migration data, and redirect to -// the service for the login. -// -// options: -// loginService: "facebook", "google", etc. -// loginStyle: "popup" or "redirect" -// loginUrl: The URL at the login service provider to start the OAuth flow. -// credentialRequestCompleteCallback: for the popup flow, call when the popup -// is closed and we have the credential from the login service. -// credentialToken: our identifier for this login flow. -// +/** + * Launch an OAuth login flow. For the popup login style, show the + * popup. For the redirect login style, save the credential token for + * this login attempt in the reload migration data, and redirect to + * the service for the login. + * + * @param {Object} options + * @param {string} options.loginService "facebook", "google", etc. + * @param {string} options.loginStyle "popup" or "redirect" + * @param {string} options.loginUrl The URL at the login service provider to start the OAuth flow. + * credentialRequestCompleteCallback: for the popup flow, call when the popup + * is closed and we have the credential from the login service. + * @param {string} options.credentialToken our identifier for this login flow. + **/ OAuth.launchLogin = options => { if (! options.loginService) throw new Error('loginService required'); diff --git a/packages/oauth/oauth_server.js b/packages/oauth/oauth_server.js index 1b591a455b..f1098a30ca 100644 --- a/packages/oauth/oauth_server.js +++ b/packages/oauth/oauth_server.js @@ -358,7 +358,7 @@ const renderEndOfLoginResponse = options => { // to the OAuth server and authorized this app, we communicate the // credentialToken and credentialSecret to the main window. The main // window must provide both these values to the DDP `login` method to -// authenticate its DDP connection. After communicating these vaues to +// authenticate its DDP connection. After communicating these values to // the main window, we close the popup. // // We export this function so that developers can override this