mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Bump Facebook Graph version to 17
And add JSDoc comment OAuth.launchLogin to and fix a typo
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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}` +
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Facebook OAuth flow",
|
||||
version: '1.11.2'
|
||||
version: '1.11.3'
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user