Auth(both entication and orization) is OAuth2 based, nothing really special apart from asking them to get client id/secret and provide your own callback url to receive the code and exchange it with (both access and refresh) token for use with API call, which simply returns JSON. fcl-web and fcl-json has everything you need, provided you know how to make a oauth client capable web application and parsing json with them.