Skip to content

Commit

Permalink
Fix OAuth without state (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
gchristov authored May 24, 2023
1 parent 1d1c844 commit e60f9ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SlackAuthApiService(
response: ApiResponse
): Either<Throwable, Unit> {
val code: String? = request.query["code"]
val state: String? = request.query["state"]
val state = request.query.get<String?>("state").takeIf { !it.isNullOrEmpty() }
return slackAuthUseCase(code = code).flatMap {
val stateResult = state?.let { handleAuthState(it) } ?: Either.Right(Unit)
stateResult.flatMap {
Expand Down

0 comments on commit e60f9ca

Please sign in to comment.