Skip to content

Instantly share code, notes, and snippets.

@jacobsapps
Created August 15, 2025 12:57
Show Gist options
  • Save jacobsapps/731ddf8cc33c40c1a43e09911a07307e to your computer and use it in GitHub Desktop.
Save jacobsapps/731ddf8cc33c40c1a43e09911a07307e to your computer and use it in GitHub Desktop.
actor AuthServiceImpl: AuthService {
func getBearerToken() async throws -> String {
if cachedToken.isValid {
return cachedToken
}
return try await authAPI.refreshCredentials() <-- suspension point
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment