CredentialManager
If you want to use credential-manager to store/read OAuth2 tokens (or directly utilize an AuthenticationController
instance),
you can build a CredentialManager
yourself, and pass it to the builder via the .withCredentialManager(credentialManager)
method.
tip
Most users do not need to manually create a CredentialManager
, and can ignore this page.
Register the twitch identity provider using the AuthModule
- Java
- Kotlin
- Groovy
CredentialManager credentialManager = CredentialManagerBuilder.builder().build();
TwitchAuth.registerIdentityProvider(credentialManager, "your-client-id", "your-client-secret", "your-redirect-url");
val credentialManager = CredentialManagerBuilder.builder().build().also {
TwitchAuth.registerIdentityProvider(it, "your-client-id", "your-client-secret", "your-redirect-url")
}
def credentialManager = CredentialManagerBuilder.builder().build()
TwitchAuth.registerIdentityProvider(credentialManager, "your-client-id", "your-client-secret", "your-redirect-url")
Register the twitch identity provider manually
- Java
- Kotlin
- Groovy
CredentialManager credentialManager = CredentialManagerBuilder.builder().build();
credentialManager.registerIdentityProvider(new TwitchIdentityProvider("jzkbprff40iqj646a697cyrvl0zt2m6", "**SECRET**", ""));
val credentialManager = CredentialManagerBuilder.builder().build().also {
it.registerIdentityProvider(TwitchIdentityProvider("jzkbprff40iqj646a697cyrvl0zt2m6", "**SECRET**", ""))
}
def credentialManager = CredentialManagerBuilder.builder().build()
credentialManager.registerIdentityProvider(new TwitchIdentityProvider("jzkbprff40iqj646a697cyrvl0zt2m6", "**SECRET**", ""))