fix `expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. Consider using the '-Xexpect-actual-classes' flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573
This commit is contained in:
+4
-1
@@ -23,7 +23,10 @@ val authFeatureModule = module {
|
||||
// Bridge to core network TokenProvider without adding a hard dependency there
|
||||
single<TokenProvider> {
|
||||
object : TokenProvider {
|
||||
override fun getAccessToken(): String? = get<AuthTokenManager>().getToken()
|
||||
override fun getAccessToken(): String? {
|
||||
val token = get<AuthTokenManager>().getToken()
|
||||
return token
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ package at.mocode.clients.authfeature.oauth
|
||||
|
||||
data class CallbackParams(val code: String, val state: String?)
|
||||
|
||||
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
|
||||
expect object AuthCallbackParams {
|
||||
/**
|
||||
* Parse OAuth callback parameters from the current environment.
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ object OAuthParams {
|
||||
* For the desktop (JVM) target we currently do not start a browser flow,
|
||||
* but we provide hashing to keep API parity.
|
||||
*/
|
||||
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
|
||||
expect object OAuthPkceService {
|
||||
/** Starts a PKCE auth attempt and stores transient state in memory. */
|
||||
suspend fun startAuth(): PkceState
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ package at.mocode.clients.authfeature.oauth
|
||||
|
||||
import kotlinx.browser.window
|
||||
|
||||
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
|
||||
actual object AuthCallbackParams {
|
||||
actual fun parse(): CallbackParams? {
|
||||
val search = window.location.search
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ private fun sha256(input: String): Promise<ArrayBuffer> {
|
||||
return subtle.digest("SHA-256", data) as Promise<ArrayBuffer>
|
||||
}
|
||||
|
||||
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
|
||||
actual object OAuthPkceService {
|
||||
actual suspend fun startAuth(): PkceState {
|
||||
val codeVerifier = randomUrlSafe(64)
|
||||
|
||||
Reference in New Issue
Block a user