Deep Link Auth

Mobile SDK / Login & Registration

Deep Link Authorization provides a means of obtaining an access token from an existing LevelUp user without requiring their email or password. Instead an app-switching model is used.

The user is deep linked from your app into LevelUp’s app, where they are presented with a dialog describing the list of permissions being requested. After responding to the request, the user is returned into the requesting app.

iOS

Use LUDeepLinkAuth to initiate Deep Link Auth requests and to handle their responses.

In order to facilitate the full authorization flow, your app must be configured with a custom URL scheme as described in “Implementing Custom URL Schemes” in Apple’s iOS Programming Guide.

In addition, after you create your app in the LevelUp Developer Platform please email us to provide your app’s bundle ID and URL scheme in order to verify valid Deep Link Auth requests.

Android

Deep Link Authorization on Android is done via public Intents. To make integration easier, we provide LevelUpDeepLinkAuthIntegrator which verifies whether a compatible version of the LevelUp app is installed and constructs the appropriate Intent for you.

To use this, you will need to generate a Google-Maps-style signature for your app. This is simply the SHA-1 fingerprint of your app’s signing certificate and the package ID declared in your app’s manifest, separated by a semicolon. For example:

4C:65:76:65:6C:55:70:52:6F:63:6B:73:59:6F:75:72:53:6F:78:21;com.example.android.luexample

You can generate this by following Google Maps detailed directions on the subject (skipping the parts that tell you to put it in the Google API Console), or you can run this one-liner from within your app:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //…

        Log.i("LUDeepLinkAuth", DeepLinkAuthUtil.getPackageSignature(this, getPackageName()));
    }

Then you can just check your logcat for the signature:

adb logcat -s LUDeepLinkAuth

Keep in mind that you’ll need one for both your debug key and your production key, so make sure to run that snippet for each build flavor. Once you have the signatures, please send them to your contact at LevelUp.