@schibsted/account-sdk-browser
Advanced tools
Comparing version 3.0.0-beta.3 to 3.0.0-beta.4
# Changelog | ||
## v3.0.0-beta.4 (2018-03-19) | ||
### New features | ||
* There is only one change in this release, and that is the addition of a `loginHint` parameter on | ||
the `Indentity.login()` and `Identity.loginUrl()` functions. This enables the caller to pre-fill | ||
the user identifier (email or phone number) | ||
## v3.0.0-beta.3 (2018-03-16) | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "@schibsted/account-sdk-browser", | ||
"version": "3.0.0-beta.3", | ||
"version": "3.0.0-beta.4", | ||
"description": "Schibsted Account SDK for browsers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -483,2 +483,3 @@ /* Copyright 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license. | ||
* legacy/stable SPiD flow? | ||
* @param {string} [loginHint=''] - user email hint | ||
* @return {Window|null} - Reference to popup window if created (or `null` otherwise) | ||
@@ -493,5 +494,6 @@ */ | ||
newFlow = true, | ||
loginHint = '' | ||
}) { | ||
this._closePopup(); | ||
const url = this.loginUrl(state, acrValues, scope, redirectUri, newFlow); | ||
const url = this.loginUrl(state, acrValues, scope, redirectUri, newFlow, loginHint); | ||
if (preferPopup) { | ||
@@ -556,2 +558,3 @@ this.popup = | ||
* login? If this parameter is set to false, the `acrValues` parameter doesn't have any effect | ||
* @param {string} [loginHint=''] - user email hint | ||
* @return {string} - The url | ||
@@ -564,3 +567,4 @@ */ | ||
redirectUri = this.redirectUri, | ||
newFlow = true | ||
newFlow = true, | ||
loginHint = '' | ||
) { | ||
@@ -582,3 +586,4 @@ assert(!acrValues || isStrIn(acrValues, ['', 'otp-email', 'otp-sms'], true), | ||
state, | ||
acr_values: acrValues | ||
acr_values: acrValues, | ||
login_hint: loginHint | ||
}); | ||
@@ -591,3 +596,4 @@ } else { | ||
scope, | ||
state | ||
state, | ||
email: loginHint | ||
}); | ||
@@ -594,0 +600,0 @@ } |
85455
1686