2.0.0-beta.2 (2021-04-06)
- Breaking change: Renamed errors
CredentialUnavailable
toCredentialUnavailableError
, andAuthenticationRequired
toAuthenticationRequiredError
, to align with the naming convention used for error classes in the Azure SDKs in JavaScript. - Added
clientId
to theAuthenticationRecord
type, alongsides thetenantId
that this interface already had. Together they can be used to re-authenticate after recovering a previously serializedAuthenticationRecord
. - The
serialize()
method on theAuthenticationRecord
object that allows an authenticated account to be stored as a string and re-used in another credential at any time, is removed in favor of a standalone functionserializeAuthenticationRecord
similar to how we have thedeserializeAuthenticationRecord
function. serializeAuthenticationRecord
now serializes into a JSON string with camel case properties. This makes it re-usable across languages.- Removed the interface
PersistentCredentialOptions
(introduced in2.0.0-beta.1
) and instead inlined the options for the persistent cache feature in the options of individual credentials. - Added properties
scopes
andgetTokenOptions
to the AuthenticationRequired error. These properties hold the values used by thegetToken()
method on your credential to fetch the access token. You should pass these to theauthenticate()
method on your credential if you wanted to do manual authentication after catching theAuthenticationRequired
error. InteractiveBrowserCredential
no longer supports Implicit Grant Flow and will only support Auth Code Flow instead. Therefore theflow
option introduced in1.2.4-beta.1
has been removed. More information from the documentation on Implicit Grant Flow:
With the plans for third party cookies to be removed from browsers, the implicit grant flow is no longer a suitable authentication method. The silent SSO features of the implicit flow do not work without third party cookies, causing applications to break when they attempt to get a new token. We strongly recommend that all new applications use the authorization code flow that now supports single page apps in place of the implicit flow, and that existing single page apps begin migrating to the authorization code flow as well.