# Secrets and Build Config

AppKickstarter leverages [BuildKonfig](https://github.com/yshrsmz/BuildKonfig) to store secrets and dispatch them in all platforms.

For example we have in local.properties this secret:&#x20;

```
# Google Sign in
google_sign_in_web_client_id=
```

In Shared module (build.gradle file) we get the local.properties secrets and create usable constants:&#x20;

```
buildkonfig {
    packageName = "com.appkickstarter.shared"

    val props = Properties()

    try {
        props.load(file("../local.properties").inputStream())
    } catch (e: Exception) {
        // keys are private and can not be committed to git
    }

    defaultConfigs {
        buildConfigField(
            STRING,
            "GOOGLE_SIGN_IN_WEB_CLIENT_ID",
            props["google_sign_in_web_client_id"]?.toString() ?: ""
        )
    }
}
```

This way we can use in Kotlin code (multiplatform) :&#x20;

```
private fun initGoogleAuth() {
    val credentials = GoogleAuthCredentials(serverId = BuildKonfig.GOOGLE_SIGN_IN_WEB_CLIENT_ID)
    ...
}
```
