@mendeley/api
Advanced tools
Comparing version 6.3.3 to 6.3.4
{ | ||
"name": "mendeley-javascript-sdk", | ||
"version": "6.3.2", | ||
"version": "6.3.4", | ||
"description": "Mendeley API JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -14,3 +14,3 @@ 'use strict'; | ||
if (hashParts[0] === 'token') { | ||
if (hashParts[0] === '#access_token') { | ||
hash = hashParts[1]; | ||
@@ -17,0 +17,0 @@ } |
{ | ||
"name": "@mendeley/api", | ||
"version": "6.3.3", | ||
"version": "6.3.4", | ||
"description": "Mendeley API JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -58,3 +58,3 @@ 'use strict'; | ||
it('should read the access token from a URL hash', function() { | ||
var win = mockWindow('https:', 'example.com', 'app', 'token=auth'); | ||
var win = mockWindow('https:', 'example.com', 'app', '#access_token=auth'); | ||
var options = {win: win, clientId: 9999}; | ||
@@ -67,3 +67,3 @@ | ||
it('should prefer an access token in the hash over the URL', function() { | ||
var win = mockWindow('https:', 'example.com', 'app', 'token=hash-auth'); | ||
var win = mockWindow('https:', 'example.com', 'app', '#access_token=hash-auth'); | ||
win.document.cookie = 'accessToken=cookie-auth'; | ||
@@ -149,3 +149,3 @@ var options = {win: win, clientId: 9999}; | ||
it('should NOT read the access token from a URL hash', function() { | ||
var win = mockWindow('https:', 'example.com', 'app', 'token=auth'); | ||
var win = mockWindow('https:', 'example.com', 'app', '#access_token=auth'); | ||
var options = {win: win, clientId: 9999}; | ||
@@ -152,0 +152,0 @@ |
1513925