okta / okta-devices-kotlin Goto Github PK
View Code? Open in Web Editor NEWokta-devices-kotlin
Home Page: https://github.com/okta/okta-devices-kotlin
License: Apache License 2.0
okta-devices-kotlin
Home Page: https://github.com/okta/okta-devices-kotlin
License: Apache License 2.0
test
test
test
test
test bug
test
test
test
test
test
test
I was experimenting with different values in local.properties and after several install/uninstall actions it got stuck with following crash.
I tried to uninstall the app and clear app data, clear cache, but it is still crashing on the fresh install. Stack trace:
FATAL EXCEPTION: main
Process: example.okta.android.push_sample_app, PID: 11809
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:581)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)ย
Caused by: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at com.google.crypto.tink.shaded.protobuf.ArrayDecoders.decodeUnknownField(ArrayDecoders.java:1036)
at com.google.crypto.tink.shaded.protobuf.ArrayDecoders.decodeUnknownField(ArrayDecoders.java:1028)
at com.google.crypto.tink.shaded.protobuf.MessageSchema.parseProto3Message(MessageSchema.java:5426)
at com.google.crypto.tink.shaded.protobuf.MessageSchema.mergeFrom(MessageSchema.java:5442)
at com.google.crypto.tink.shaded.protobuf.ArrayDecoders.decodeMessageField(ArrayDecoders.java:246)
at com.google.crypto.tink.shaded.protobuf.ArrayDecoders.decodeMessageList(ArrayDecoders.java:704)
at com.google.crypto.tink.shaded.protobuf.MessageSchema.parseProto3Message(MessageSchema.java:5373)
at com.google.crypto.tink.shaded.protobuf.MessageSchema.mergeFrom(MessageSchema.java:5442)
at com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:1567)
at com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:1680)
at com.google.crypto.tink.proto.Keyset.parseFrom(Keyset.java:958)
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.read(SharedPrefKeysetReader.java:84)
at com.google.crypto.tink.CleartextKeysetHandle.read(CleartextKeysetHandle.java:61)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.read(AndroidKeysetManager.java:332)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewKeyset(AndroidKeysetManager.java:288)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:239)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:169)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:130)
at example.okta.android.sample.client.AuthenticatorClient.(AuthenticatorClient.kt:64)
at example.okta.android.sample.MyBankApplication$authenticatorClient$2.invoke(MyBankApplication.kt:24)
at example.okta.android.sample.MyBankApplication$authenticatorClient$2.invoke(MyBankApplication.kt:24)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at example.okta.android.sample.MyBankApplication.getAuthenticatorClient(MyBankApplication.kt:24)
at example.okta.android.sample.app.MainActivity$onCreate$1$1.invoke(MainActivity.kt:31)
at example.okta.android.sample.app.MainActivity$onCreate$1$1.invoke(MainActivity.kt:30)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.material.MaterialTheme_androidKt.PlatformMaterialTheme(MaterialTheme.android.kt:23)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:82)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:81)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material.TextKt.ProvideTextStyle(Text.kt:363)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
2023-04-19 13:03:04.338 11809-11809 AndroidRuntime exa....okta.android.push_sample_app E at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:72)
at example.okta.android.sample.app.MainActivity$onCreate$1.invoke(MainActivity.kt:30)
at example.okta.android.sample.app.MainActivity$onCreate$1.invoke(MainActivity.kt:29)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:177)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:123)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:122)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:114)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:157)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:156)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:156)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:140)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3352)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3342)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3342)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3277)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:587)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:966)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519)
2023-04-19 13:03:04.339 11809-11809 AndroidRuntime exa....okta.android.push_sample_app E at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1072)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:131)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:182)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:138)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1159)
at android.view.View.dispatchAttachedToWindow(View.java:21976)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4293)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4302)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4302)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4302)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4302)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4302)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:4302)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3474)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2924)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10513)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1108)
at android.view.Choreographer.doCallbacks(Choreographer.java:866)
at android.view.Choreographer.doFrame(Choreographer.java:797)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
... 3 more
Application starts without a crash.
Sample app crashes on startup.
n/a
Okta Push SDK 1.0.0
n/a
Cannot build a project after adding implementation("com.okta.devices:devices-push:0.0.1")
dependency to the project.
It seems that this library uses proguard to obfuscate classes and it creates the same class name as another library used in my project, full error:
Caused by: java.lang.RuntimeException: Duplicate class a.a found in modules jetified-devices-core-0.0.1-runtime (com.okta.devices:devices-core:0.0.1) and jetified-mobilesdk-v1.1.12-runtime (com.liveramp:mobilesdk:v1.1.12)
I found fixes for similar issues in other libraries:
Please use flattenpackagehierarchy
in your ProGuard rules to move obfuscated classes in some unique package to prevent aforementioned conflicts with other libraries.
More details:
helpcrunch/android-sdk-demo#33
Adyen/adyen-3ds2-android#14
Project builds after adding this library.
Project cannot be built.
Try to build this library with com.liveramp:mobilesdk:v1.1.12
in your dependencies.
Please check my proposed fix in "Describe bug" section.
0.0.1
gradle:7.2.0
Cannot build a project after adding implementation("com.okta.devices:devices-push:0.0.2") dependency to the project, with following error:
Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <webAuthenticationRedirectScheme> is provided.
Thanks to the sample app I found out that it can be fixed by adding to app's build.gradle:
manifestPlaceholders["webAuthenticationRedirectScheme"] = "XXX"
But I don't understand why it is needed and there is nothing about it in the integration guide here:
https://developer.okta.com/docs/guides/authenticators-custom-authenticator/android/main/#install-and-configure-the-okta-devices-sdk
In my use case I just want to use the PUSH Notifications as a second factor of auth and I already have OKTA integrated with this library https://github.com/openid/AppAuth-Android for authorisation.
Project builds after adding this library with no extra dependencies.
Project cannot be built.
Add implementation("com.okta.devices:devices-push:0.0.2")
dependency to the project
No response
0.0.2
gradle:7.2.0
I am trying to use AuthenticatorClient#retrievePendingChallenges
method in the same way as in the sample app. I invoke it with
private val readScope = listOf("okta.myAccount.appAuthenticator.maintenance.read")
and I am receiving following error:
com.okta.devices.api.errors.DeviceAuthenticatorError$InternalDeviceError: The client is not authorized to use the provided grant type. Configured grant types: [refresh_token, authorization_code].
at com.okta.devices.authenticator.exceptions.DeviceResultExtKt.toResult(SourceFile:66)
at com.okta.devices.AuthenticatorEnrollmentCore.getToken-0E7RQCE(SourceFile:2)
at com.okta.devices.AuthenticatorEnrollmentCore.getToken-0E7RQCE$default(SourceFile:1)
at com.okta.devices.push.PushEnrollmentImpl.retrieveMaintenanceToken-gIAlu-s(PushEnrollmentImpl.kt:50)
I expect to retrieve all enrollments with maintance token to check if there are any pending challanges.
Backend returns following error:
com.okta.devices.api.errors.DeviceAuthenticatorError$InternalDeviceError: The client is not authorized to use the provided grant type. Configured grant types: [refresh_token, authorization_code].
User login with following scopes:
"openid",
"profile",
"email",
"offline_access",
"okta.myAccount.appAuthenticator.manage",
"okta.myAccount.appAuthenticator.read",
"okta.myAccount.appAuthenticator.maintenance.read"
User enrolls for Okta Push SDK
On app second startup I call AuthenticatorClient#retrievePendingChallenges
method.
On the server side we have following scopes configured:
OKTA Devices 1.0.0.
Not related to building.
User can still see Push notification enrollment method on the web, after deleting enrollment with SDK 1.0.0.
User no longer sees "Get push notification" as one of the verify options, when logging in via website, after deleting enrollment.
User can see "Get push notification" as one of the verify options, after deleting enrollment.
No response
OKTA Devices 1.0.0.
Not related to building.
The Play Store is reporting that SafetyNet Attestation API is deprecated and soon will be shut down.
Our app is getting the following warning in the screenshot, because of the dependency com.google.android.gms:play-services-safetynet:18.0.1
. Which is a dependency of com.okta.devices:devices-push:1.1.0
To use non-deprecated API
Usage of a deprecated API
Using latest version of the library com.okta.devices:devices-push:1.1.0
No response
SDK Version 1.1.0
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.