thaipbs-account-client
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "thaipbs-account-client", | ||
"description": "JavaScript library for seamlessly authorization between sites under ThaiPBS (thaipbs.or.th)", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "src/index.js", | ||
@@ -6,0 +6,0 @@ "devDependencies": { |
@@ -38,4 +38,4 @@ # ThaiPBS Account JS | ||
client.authorize() | ||
.then(function(user) { | ||
if (user) { | ||
.then(function(data) { | ||
if (data && data.user) { | ||
// Hooray! The user is logged in. | ||
@@ -42,0 +42,0 @@ } |
@@ -11,3 +11,3 @@ import cookieTokenStore from './cookieTokenStore'; | ||
|| cookieTokenStore(this.options.cookieName || 'account_token'); | ||
this.frameController = new FrameController(this.options.iframeUrl || 'https://account.thaipbs.or.th'); | ||
this.frameController = new FrameController(this.options.iframeUrl || 'https://account.thaipbs.or.th?minimal=1'); | ||
this.frameController.initialize(); | ||
@@ -50,4 +50,4 @@ } | ||
return this.frameController | ||
.waitMessageOnce(['onLoggedIn', 'onRegistered']) | ||
.then((data) => { return data.user; }); | ||
.waitMessageOnce(['onLoggedIn', 'onRegistered', 'onClose']) | ||
.then((data) => { return data; }); | ||
}) | ||
@@ -54,0 +54,0 @@ .catch(reject); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8069
0
1