Skip to content

Commit

Permalink
document oauth config
Browse files Browse the repository at this point in the history
  • Loading branch information
angryziber committed Dec 5, 2024
1 parent 3735d52 commit 08afbf4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions oauth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ Implements OAuth 2.0 login with several common [providers](src/OAuthClient.kt).

You need to provide implementations of [OAuthUser and OAuthUserProvider](src/OAuthUser.kt) in your project.

In the env/config, you need to provide clientId and secrets for each provider that you want to use:
```
GOOGLE_OAUTH_CLIENT_ID=...
GOOGLE_OAUTH_CLIENT_SECRET=...
```


```kotlin
context("/oauth") {
register<OAuthUserProider>(MyUserProvider::class)
register(httpClient())
register<GoogleOAuthClient>()
register<MicrosoftOAuthClient>()
...
Expand Down

0 comments on commit 08afbf4

Please sign in to comment.