Skip to content

Commit

Permalink
Fix missed onAuthorizationCodeReceived callback
Browse files Browse the repository at this point in the history
  • Loading branch information
nrobi144 committed Feb 11, 2022
1 parent a8765b6 commit 4cdbcc6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ fun TeslAuth(
}
is ReceivedAccessToken -> onAccessTokenReceived?.invoke(it.token)
is Error -> onError(it.t)
is AuthorizationCodeReceived -> if (onBearerTokenReceived != null || onAccessTokenReceived != null) {
viewModel.getBearerToken(it.code)
is AuthorizationCodeReceived -> {
onAuthorizationCodeReceived?.invoke(it.code)
if (onBearerTokenReceived != null || onAccessTokenReceived != null) {
viewModel.getBearerToken(it.code)
}
}
Dismiss -> onDismiss()
}
Expand Down

0 comments on commit 4cdbcc6

Please sign in to comment.