Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android app crashes while trying to authenticate with access token got from vimeo developer dashboard. Below is the stacktrace #526

Open
vkfan opened this issue Oct 21, 2021 · 0 comments

Comments

@vkfan
Copy link

vkfan commented Oct 21, 2021

  • Stacktrace

    Caused by: java.lang.IllegalStateException: Authentication is not supported when using a fixed access token
    at com.vimeo.networking2.internal.NoOpAuthenticatorImpl.reject(NoOpAuthenticatorImpl.kt:85)
    at com.vimeo.networking2.internal.NoOpAuthenticatorImpl.authenticateWithClientCredentials(NoOpAuthenticatorImpl.kt:23)
    at com.radio.playbackspeeddemo.PlayApp.onCreate(PlayApp.kt:27)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6850)


  • Code causing issue:

val accessToken: String = "token here"
var vimeoApiConfiguration: VimeoApiConfiguration? = null
var vimeoApiClient: VimeoApiClient? = null

    vimeoApiConfiguration = VimeoApiConfiguration.Builder(accessToken)
        .build()
    val authenticator = Authenticator(vimeoApiConfiguration!!)

    vimeoApiClient = VimeoApiClient(vimeoApiConfiguration!!, authenticator)

    authenticator.authenticateWithClientCredentials(
        vimeoCallback(
            onSuccess = {
                Log.e("vimeo success", "vimeo success")
            },
            onError = {
                Log.e("vimeo failed", "vimeo failed")
            }
        )
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant