diff --git a/README.md b/README.md index 2d9bb22..21f6bef 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ written for Android. You can read more on the [Descope Website](https://descope. Add the following to your `build.gradle` dependencies: ```groovy -implementation 'com.descope:descope-kotlin:0.9.7' +implementation 'com.descope:descope-kotlin:0.9.8' ``` ## Quickstart diff --git a/descopesdk/src/main/java/com/descope/internal/http/DescopeClient.kt b/descopesdk/src/main/java/com/descope/internal/http/DescopeClient.kt index fcf1090..b266e01 100644 --- a/descopesdk/src/main/java/com/descope/internal/http/DescopeClient.kt +++ b/descopesdk/src/main/java/com/descope/internal/http/DescopeClient.kt @@ -365,9 +365,7 @@ internal class DescopeClient(internal val config: DescopeConfig) : HttpClient(co "provider" to provider.name, "redirectURL" to redirectUrl, ), - body = mapOf( - "loginOptions" to options?.toMap(), - ), + body = options?.toMap() ?: emptyMap(), ) suspend fun oauthWebExchange(code: String): JwtServerResponse = post( @@ -408,9 +406,7 @@ internal class DescopeClient(internal val config: DescopeConfig) : HttpClient(co "tenant" to emailOrTenantId, "redirectURL" to redirectUrl, ), - body = mapOf( - "loginOptions" to options?.toMap(), - ), + body = options?.toMap() ?: emptyMap(), ) suspend fun ssoExchange(code: String): JwtServerResponse = post( diff --git a/descopesdk/src/main/java/com/descope/sdk/Routes.kt b/descopesdk/src/main/java/com/descope/sdk/Routes.kt index 92a56db..991b994 100644 --- a/descopesdk/src/main/java/com/descope/sdk/Routes.kt +++ b/descopesdk/src/main/java/com/descope/sdk/Routes.kt @@ -539,10 +539,10 @@ interface DescopeOAuth { * @param options additional behaviors to perform during authentication. * @return a URL that starts the OAuth redirect chain */ - suspend fun start(provider: OAuthProvider, redirectUrl: String?, options: List? = null): String + suspend fun start(provider: OAuthProvider, redirectUrl: String? = null, options: List? = null): String /** @see start */ - fun start(provider: OAuthProvider, redirectUrl: String?, options: List? = null, callback: (Result) -> Unit) + fun start(provider: OAuthProvider, redirectUrl: String? = null, options: List? = null, callback: (Result) -> Unit) /** * Completes an OAuth redirect chain. diff --git a/descopesdk/src/main/java/com/descope/sdk/Sdk.kt b/descopesdk/src/main/java/com/descope/sdk/Sdk.kt index c101bcf..990f39a 100644 --- a/descopesdk/src/main/java/com/descope/sdk/Sdk.kt +++ b/descopesdk/src/main/java/com/descope/sdk/Sdk.kt @@ -71,6 +71,6 @@ class DescopeSdk(val config: DescopeConfig) { const val name = "DescopeAndroid" /** The Descope SDK version */ - const val version = "0.9.7" + const val version = "0.9.8" } }