Cross Platform Android Configuration

Configure your Flutter or React Native app for Android

To enable support for passkeys for the Android version of your mobile app, Google requires that you associate your app with a website that your app owns by publishing a Digital Asset Links file. Instructions can be found in "Step 1" or our Android SDK docs:

Publish Digital Asset Links file

Step 2: Register your Android app with Passage

For passkeys to work in any Android app, Google requires the app's "APK key hash" to be set as the relying party's auth origin. Instructions on how to get and add this key hash for your Passage app can be found in "Step 2" of our Android SDK docs:

Register Android app with Passage

Step 3: Add Passage auth origin to your Android app

In your app’s strings.xml file, copy and past the following, replacing YOUR_APP_ID and YOUR_AUTH_ORIGIN:

<resources>
    //..

    <!-- Required Passage app settings -->
    <string name="passage_auth_origin">YOUR_AUTH_ORIGIN</string>
    <string name="asset_statements">
      [{
        \\"include\\": \\"https://@string/passage_auth_origin/.well-known/assetlinks.json\\"
      }]
    </string>

</resources>

Your app's strings.xml file can be found at:

<app root directory>/android/app/src/main/res/values/strings.xml

Finally, paste the following meta-data into your app’s AndroidManifest.xml:

<manifest ...>
    <application ...>

        <meta-data
          android:name="asset_statements"
          android:resource="@string/asset_statements" />

    </application>
</manifest>

Your app's AndroidManifext.xml file can be found at:

<app root directory>/android/app/src/main/AndroidManifest.xml

Last updated