How Dashlane Brought Credential Manager to Wear OS with Only 78 New Lines of Code

How Dashlane Brought Credential Manager to Wear OS with Only 78 New Lines of Code

Home » News » How Dashlane Brought Credential Manager to Wear OS with Only 78 New Lines of Code
Table of Contents

Posted by John Zoeller – Developer Relations Engineer, Loyrn Hairston – Product Advertising Supervisor, and Jonathan Salamon – Dashlane Employees Software program Engineer

Dashlane is a password administration and provision software that gives a safe approach to handle consumer credentials, entry management, and authentication throughout a number of programs and purposes.

Dashlane has over 18 million customers and 20,000 companies in 180 international locations. It’s obtainable on Android, Put on OS, iOS, macOS, Home windows, and as an online app with an extension for Chrome, Firefox, Edge, and Safari.

Just lately, they expanded their choices by making a Put on OS app with a Credential Supplier integration from the Credential Supervisor API, bringing passkeys to their purchasers and customers on smartwatches.

Streamlining Authentication on Put on OS

Dashlane customers have steadily requested a Put on OS answer that gives standalone authentication for his or her favourite apps. Up to now, Put on OS lacked the important thing APIs mandatory for this request, which stored Dashlane from having the ability to present the performance. Of their phrases:

“Our largest problem was the dearth of an ordinary credentials API on Put on OS, which meant that it was inconceivable to convey our core options to this platform.”

This has modified with the introduction of the brand new Credential Supervisor API on Put on OS.

Credential Supervisor supplies a simplified, standardized consumer sign-in expertise with built-in authentication choices for passkeys, passwords, and federated identities like Check in with Google. Conveniently, it may be carried out with minimal effort by reusing the identical code because the cell model.

The Dashlane staff was thrilled to find out about this, because it meant they might save a variety of effort and time: “[The] CredentialManager API supplies the identical API on telephones and Put on OS; you write the code solely as soon as to help a number of type components.”

Credential selection Screenshot

Deciding on Dashlane-provided credentials is easy for customers

After Dashlane had deliberate out their roadmap, they had been in a position execute their imaginative and prescient for the brand new app with solely a small engineering funding, reusing 92% of the Credential Supervisor code from their cell app. And since the builders constructed Dashlane’s app UI with Jetpack Compose for Put on OS, 60% of their UI code was additionally reused.

Quote from Sebastien Eggenspieler, Senior engineer at Dashlane

Growing for Put on OS

To supply credentials to different apps with Credential Supervisor, Dashlane wanted to implement the Credential Supplier interface on Put on OS. This proved to be a easy train in calling their present cell code, the place Dashlane had already carried out conduct for credential querying and credential choice.

For instance, Dashlane was capable of reuse their logic to deal with consumer invocations of CredentialManager.getCredential. When a consumer invokes this, the Android framework propagates the consumer’s getCredentialRequest to Dashlane’s CredentialProviderService.onBeginGetCredentialRequest implementation to retrieve the credentials specified within the request.

Dashlane delegates the logic for onBeginGetCredentialRequest to their handleGetCredentials operate, under, which is shared between their cell and Put on OS implementations.

// When a Credential Supervisor consumer calls 'getCredential', the Android
// framework invokes `onBeginGetCredentialRequest`. Dashlane
// carried out this `handleGetCredentials` operate to deal with a few of
// the logic wanted for `onBeginGetCredentialRequest`
override enjoyable handleGetCredentials(
    context: Context,
    request: BeginGetCredentialRequest):
Listing<CredentialEntry> =
  request.beginGetCredentialOptions.flatMap { choice ->
    when (choice) {
      // Deal with passkey credential
      is BeginGetPublicKeyCredentialOption -> {
        val passkeyRequestOptions = Gson().fromJson(
            choice.requestJson, PasskeyRequestOptions::class.java)

        credentialLoader.loadPasskeyCredentials(
          passkeyRequestOptions.rpId,
          passkeyRequestOptions.allowCredentials ?: listOf()
        ).map { passkey ->
          val passkeyDisplayName = getSuggestionTitle(passkey, context)

          PublicKeyCredentialEntry.Builder(
            context,
            passkeyDisplayName,
            pendingIntentForGet(context, passkey.id),
            choice
          )
          .setLastUsedTime(passkey.locallyViewedDate)
          .setIcon(buildMicroLogomarkIcon(context = context))
          .setDisplayName(passkeyDisplayName)
          .construct()
// Deal with different credential varieties

Reusing exact logic flows like this made it a breeze for Dashlane to implement their Put on OS app.

“The Credential Supervisor API is unified throughout telephones and Put on OS, which was an enormous benefit. It meant we solely needed to write our code as soon as.”

Influence and Improved Progress

The staff is happy to be among the many first credential suppliers on wearables: “Being one of many first on Put on OS was a key differentiator for us. It reinforces our model as an innovator, specializing in the consumer expertise, higher assembly and serving our customers the place they’re.”

As an early adopter of this new know-how, Dashlanes Put on OS app has already proven early promise, as described by Dashlane software program engineer, Sebastien Eggenspieler: “Within the first 3 months, our Put on OS app organically grew to symbolize 1% of our energetic gadget set up base.”

With their new expertise launched, Put on OS apps can now depend on Dashlane as a trusted credential supplier for their very own Credential Supervisor integrations, utilizing Dashlane to permit customers to log in with a single faucet; and customers can view particulars about their credentials proper from their wrist.

app homescreen screenshot

Dashlane’s revolutionary design helps customers handle their credentials

Dashlane’s Suggestions to Put on OS Builders

With their implementation full, the Dashlane staff can provide some recommendation for different builders who’re contemplating the Credential Supervisor API. Their message is evident: “the long run is passwordless… and passkeys are main the best way, [so] present a passkey choice.”

As a real innovator of their discipline, and the popular credential supplier for thus many customers, we’re thrilled to have Dashlane help Credential Supervisor. They really impressed us with their dedication to offering Put on OS customers with one of the best expertise doable:

“We hope that sooner or later each app developer will migrate their present customers to the Credential Supervisor API.”

Get Began with Credential Supervisor

With its elegant simplicity and built-in safe authentication strategies, the Credential Supervisor API supplies a easy, simple authentication expertise for customers that adjustments the sport in Put on OS.

Need to discover out extra about how Dashlane is driving the way forward for end-user authentication? Take a look at our video weblog with their staff in Paris, and examine how they discovered a 70% in sign-in conversion charges with passkeys.

To study extra about how one can implement Credential Supervisor, learn our official developer and UX guides, and remember to take a look at our model new weblog submit and video weblog as a part of Put on OS Highlight week!

We’ve additionally expanded our present Credential Supervisor pattern to help Put on OS, to assist information you alongside the best way, and if you would like to supply credentials like Dashlane, you need to use our Credential Supplier pattern.

Lastly, discover how one can begin growing further experiences for Put on OS at this time with our documentation and samples.

Supply hyperlink

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

share this article.

Enjoying my articles?

Sign up to get new content delivered straight to your inbox.

Please enable JavaScript in your browser to complete this form.
Name