Refresh OAuth tokens using Moya, RxSwift

A very common use case when working with OAuth is to refresh the auth token. One way could be to do it periodically. A much simpler way, although, is to try refresh the auth token when you see a 401 response for an authenticated user. This is very straightforward to…

Make Hexagonal View on iOS

In this post, we will explore a bit on how to use CALayer. With CALayers you can create some neat visual effects really easily. Let's see an example on how to mask a view to a hexagon using CALayer. We mostly see square or circular images on most apps. This…