Skip to content

Conversation

@pielas
Copy link
Contributor

@pielas pielas commented Jan 8, 2026

No description provided.


// after successful authorization Google redirects you here
val loginGoogleServerEndpoint = loginGoogle.handle { code =>
val backend: SyncBackend = HttpClientSyncBackend()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better to create the backend once in the app at the top-level

issuedAt = Some(now.getEpochSecond),
content = response.body
)
Right(AccessDetails(JwtCirce.encode(claim, jwtKey, jwtAlgo)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the result is always a Right, you could use infallibleEndpoint + handleSuccess

}

// try to decode the provided jwt
def authenticate(token: String): Either[String, String] = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove the {} where possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants