def auth_with_pin(client: Imgur):
    """Authorize Imgur client with a PIN

    Arguments:
        client {Imgur} -- Imgur client

    Returns:
        [tuple] -- (access_token, refresh_token) tuple
    """
    auth_url = client.authorization_url('pin')
    webbrowser.open(auth_url)
    pin = input('What is the pin: ')
    response = client.exchange_pin(pin)

    config.set_multi(config.IMGUR_SECTION, ('access_token', response[0]),
                     ('refresh_token', response[1]))

    return response