Skip to content

Commit

Permalink
fix(auth): AND-6755 fix auth issue (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis-bc committed Nov 11, 2022
1 parent 5288237 commit 577aac1
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -56,7 +56,8 @@ class WalletAuthService(private val walletApi: WalletApi) {
*/
fun getSessionId(guid: String): Observable<String> = walletApi.getSessionId(guid)
.map { responseBodyResponse ->
val headers = responseBodyResponse.headers().get("Set-Cookie")
val headers = responseBodyResponse.headers()
.firstOrNull { (key, value) -> key == "set-cookie" && value.contains("SID=") }?.second
if (headers != null) {
val fields = headers.split(";\\s*".toRegex()).dropLastWhile { it.isEmpty() }
.toTypedArray()
Expand Down

0 comments on commit 577aac1

Please sign in to comment.