https://github.com/dora4/dorachat-authsdk
DoraChat Auth SDK
https://github.com/dora4/dorachat-authsdk
Last synced: 2 months ago
JSON representation
DoraChat Auth SDK
- Host: GitHub
- URL: https://github.com/dora4/dorachat-authsdk
- Owner: dora4
- License: apache-2.0
- Created: 2026-02-26T16:18:29.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-07T23:05:49.000Z (3 months ago)
- Last Synced: 2026-03-08T04:37:31.463Z (3 months ago)
- Language: Kotlin
- Homepage:
- Size: 75.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dorachat-authsdk 
--------------------------------
#### Gradle Dependency Configuration
```groovy
// Add the following code to the build.gradle file in the project root directory
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
```
```kt
// Add data binding support
android {
buildFeatures {
dataBinding = true
}
}
// Add the following code to the build.gradle file in the app module
dependencies {
implementation("com.github.dora4:dorachat-authsdk:1.0.3")
implementation("com.github.dora4:dora:1.3.61")
implementation("com.github.dora4:dora-arouter-support:1.11")
kapt("com.alibaba:arouter-compiler:1.5.2")
implementation("com.github.dora4:dcache-android:3.6.3")
implementation("com.github.dora4:dview-loading-dialog:1.5")
implementation("com.github.dora4:dora-walletconnect-support:2.1.35") {
exclude(group = "com.madgag.spongycastle", module = "core")
}
}
```
#### Automatic Injection of Lifecycle Callback Functions
```xml
```
#### Initialize a series of components in the Application
```kt
private fun initHttp() {
RetrofitManager.initConfig {
okhttp {
// ...
flow(true) // Important
addInterceptor(AuthInterceptor())
build()
}
// ...
mappingBaseUrl(AuthService::class.java, AppConfig.AUTH_SDK_SERVER_URL)
}
}
```
```kt
private fun initAuth() {
val config = DoraChatConfig.Builder(
apiBaseUrl = AppConfig.AUTH_SDK_SERVER_URL,
partitionId = "petwords",
appName = "Pet Words",
themeColor = ContextCompat.getColor(this, R.color.primary)
)
.enableLog(true)
.autoRefreshToken(true)
.build()
DoraChatSDK.init(this, config)
}
```
```kt
private fun initPay() {
DoraFund.init(this, APP_NAME,
getString(R.string.app_desc), URL_DOMAIN,
arrayOf(EVMChains.ETHEREUM, EVMChains.POLYGON, EVMChains.AVALANCHE, EVMChains.BSC), themeColor,
object : DoraFund.PayListener {
override fun onPayFailure(orderId: String, msg: String) {
}
override fun onSendTransactionToBlockchain(
orderId: String,
transactionHash: String
) {
}
})
}
```