diff --git a/accounts-line/CHANGELOG.md b/accounts-line/CHANGELOG.md index 2c00cef..d4e71bd 100755 --- a/accounts-line/CHANGELOG.md +++ b/accounts-line/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## 1.3.1 - 2023-08-12 +* Updated dependencies on other packages +* Fix `notice.ts` reference in package settings + ## 1.3.0 - 2022-12-21 * Typescript re-write * Add `zodern:types` for type support diff --git a/accounts-line/package.js b/accounts-line/package.js index 6f8721f..47c34d0 100755 --- a/accounts-line/package.js +++ b/accounts-line/package.js @@ -1,23 +1,24 @@ +/* global Package */ Package.describe({ name: 'storyteller:accounts-line', summary: 'Login service for LINE accounts', - version: '1.3.0', + version: '1.3.1', git: 'https://github.com/StorytellerCZ/meteor-accounts-line' }); Package.onUse(api => { - api.versionsFrom('2.3'); + api.versionsFrom('2.3.6'); api.use(['ecmascript', 'typescript']); api.use('zodern:types@1.0.9') api.use('accounts-base', ['client', 'server']); // Export Accounts (etc) to packages using this one. api.imply('accounts-base', ['client', 'server']); api.use('accounts-oauth', ['client', 'server']); - api.use('storyteller:line-oauth@1.2.2'); - api.imply('storyteller:line-oauth@1.2.2'); + api.use('storyteller:line-oauth@1.4.0'); + api.imply('storyteller:line-oauth@1.4.0'); // If users use accounts-ui but not facebook-config-ui, give them a tip. - api.use(['accounts-ui', 'storyteller:line-config-ui@1.1.2'], ['client', 'server'], { weak: true }); + api.use(['accounts-ui', 'storyteller:line-config-ui@1.2.0'], ['client', 'server'], { weak: true }); api.addFiles('notice.ts'); api.addFiles('line.ts'); diff --git a/line-config-ui/package.js b/line-config-ui/package.js index c80afba..2322f78 100755 --- a/line-config-ui/package.js +++ b/line-config-ui/package.js @@ -1,3 +1,4 @@ +/* global Package */ Package.describe({ name: 'storyteller:line-config-ui', summary: 'Blaze configuration templates for LINE OAuth.', @@ -6,7 +7,7 @@ Package.describe({ }); Package.onUse(api => { - api.versionsFrom('2.3'); + api.versionsFrom('2.3.6'); api.use('zodern:types@1.0.9', 'server') api.use(['ecmascript', 'typescript'], 'client'); api.use('templating@1.4.2', 'client'); diff --git a/line-oauth/CHANGELOG.md b/line-oauth/CHANGELOG.md index 31a8b70..38491e8 100755 --- a/line-oauth/CHANGELOG.md +++ b/line-oauth/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## 1.4.0 - 2023-08-12 +* Added Meteor user agent to request + ## 1.3.2 - 2022-12-21 * Improve access token function to be more like Meteor's implementation diff --git a/line-oauth/line_server.ts b/line-oauth/line_server.ts index a2de41a..7a273de 100644 --- a/line-oauth/line_server.ts +++ b/line-oauth/line_server.ts @@ -2,6 +2,7 @@ import { fetch } from 'meteor/fetch' import { URLSearchParams } from 'meteor/url' import { ServiceConfiguration } from 'meteor/service-configuration' import { OAuth } from 'meteor/oauth' +import { Meteor } from 'meteor/meteor' const jsonwebtoken = Npm.require('jsonwebtoken') Line = {} @@ -29,6 +30,10 @@ OAuth.registerService('line', 2, null, async (query) => { return data }) +let userAgent = "Meteor" +if (Meteor.release) + userAgent += '/${Meteor.release}' + const getAccessToken = async (query) => { const config = await ServiceConfiguration.configurations.findOneAsync({ service: 'line' @@ -45,6 +50,7 @@ const getAccessToken = async (query) => { method: 'POST', headers: { Accept: 'application/json', + "User-Agent": userAgent, 'Content-Type': 'application/x-www-form-urlencoded' }, body: content, diff --git a/line-oauth/package.js b/line-oauth/package.js index 2446cc2..786b631 100755 --- a/line-oauth/package.js +++ b/line-oauth/package.js @@ -1,7 +1,8 @@ +/* global Package */ Package.describe({ name: 'storyteller:line-oauth', summary: 'LINE OAuth flow', - version: '1.3.2', + version: '1.4.0', git: 'https://github.com/StorytellerCZ/meteor-accounts-line' });