Skip to content

Commit fb7b107

Browse files
committed
update readme
1 parent 96ea8ac commit fb7b107

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,20 @@ Android implementation is [AndroidEncryptedPreferencesSettingsStore](https://kal
140140
You can use "oidc-ktor" dependency, which provides easy integration for ktor projects:
141141

142142
```kotlin
143-
HttpClient(engine) {
144-
install(Auth) {
145-
oidcBearer(
146-
tokenStore = tokenStore,
147-
refreshHandler = refreshHandler,
148-
client = client,
149-
)
150-
}
143+
HttpClient(engine) {
144+
install(Auth) {
145+
oidcBearer(
146+
tokenStore = tokenStore,
147+
refreshHandler = refreshHandler,
148+
client = client,
149+
)
151150
}
152151
}
153152
```
154153

155154
Because of the [way ktor works](https://youtrack.jetbrains.com/issue/KTOR-4759/Auth-BearerAuthProvider-caches-result-of-loadToken-until-process-death), you need to tell the client if the token is invalidated outside of ktor's refresh logic, e.g. on logout:
156155
```kotlin
157-
ktorHttpClient.clearTokens()
156+
ktorHttpClient.clearTokens()
158157
```
159158

160159
## Custom headers/url parameters

0 commit comments

Comments
 (0)