diff --git a/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/SameDeviceOID4VP.md b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/SameDeviceOID4VP.md new file mode 100644 index 0000000..9ac6a66 --- /dev/null +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/SameDeviceOID4VP.md @@ -0,0 +1,39 @@ +# Same Device OpenID4VP + +If you already have the OpenID4VP working on your app, you need to configure a deep link to get the `openid4vp://` URL and start the flow. + +## Configuring the AndroidManifest.xml to Declare Intent Filters + +Add the following inside the `` tag. + +```xml + + + + + + + + +``` + +## Handle the Intent + +Add the following inside the `override fun onCreate(...)` method. + +```kotlin +super.onCreate(savedInstanceState) + +// ... + +val deepLinkUri: Uri? = intent.data +if (deepLinkUri != null) { + // OID4VP flow integration +} + +// ... +``` + +And now your app is ready to handle `openid4vp://` URLs! diff --git a/README.md b/README.md index 3952128..e5455f1 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,7 @@ called in native SDKs. - [Kotlin SDK](https://github.com/spruceid/mobile-sdk-kt) - [Swift SDK](https://github.com/spruceid/mobile-sdk-swift) - [Rust layer](https://github.com/spruceid/mobile-sdk-rs) + +## Configuring Deep Links for same device flows + +Click [here](./MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/SameDeviceOID4VP.md) to see how to configure the same device OpenID4VP flow. \ No newline at end of file