- project's Github: https://github.com/jakipatryk/steemconnect-firebase-functions
- example app: https://sc-firebase-functions-example.firebaseapp.com/
- example app on Github: https://github.com/jakipatryk/steemconnect-firebase-functions-example
What is steemconnect-firebase-functions?
"Build apps fast, without managing infrastructure" - this is how Firebase is described on its landing page. Indeed, this is a great platform with a bunch of cool products, such as Cloud Firestore (database) or Cloud Storage (files storage). Firebase also allows users to sign in to your app with their external accounts, like Google, Facebook or Github.
However, to enable users of your Firebase based app to sign in with their Steem account you have to implement OAuth2 authorization code grant flow yourself, which can be tricky. That's why I built a library that helps in that process. Say hello to steemconnect-firebase-functions.
How does it work?
steemconnect-firebase-functions comes with OAuth2 helper functions such as
getAuthorizationUrl, SteemConnect API helper functions such as
broadcastOperations, and Firebase only helper functions such as
You still have to write code, of course, but you don't have to care about implementation of these functionalities.
Where does it work?
steemconnect-firebase-functions is a library that helps you in the process of building apps based on SteemConnect and Firebase. However, most of the functions from this library can be used in any NodeJS environment, so if you want to implement SteemConnect OAuth2 flow on your NodeJS server, this library will still be useful.
To use it, one simply has to install it via npm:
npm install steemconnect-firebase-functions --save
What kind of projects can be created with this library?
Basically, you can create anything, but I believe some kind of projects are more appropriate for steemconnect-firebase-functions than others:
- Steem-related projects that doesn't publish anything on the Steem blockchain, but need to authenticate users via their Steem account (SteemConnect); good example of this kind of app is SteemProjects by @noisy
- not Steem-related apps that want to get their users one more option to sign in to the app (if the app already has an option to sign in via Facebook, why don't they add signing in via SteemConnect?)
- apps to schedule posts publishing or curation trails
- Steem interfaces that need to moderate content, such as Utopian
- TypeScript for development, compiled to ES2015 for production
- testing stack: mocha + chai + nock + sinon
- Travis CI for CI (CD in the future)
I'm going to continue improving library and development process:
- next week, I am going to release a complete tutorial on how to build an app like example app from scratch
- more API functions to make developer's life easier (separate functions for upvote, post, comment, etc. instead of only one general
- add support for a long-lived token (refresh token and the entire process)
- write better documentation
I believe tutorials are the best way to do explain how to use a library and why is it useful, so I also plan to write more example apps and tutorials how to build them in the near future.
Do you want to contribute?
Feel free to contact me either on the steemit.chat or on the Discord.
There is still much to do ;)
Note for Utopian moderators: the entire library was made by myself, but I couldn't link more than three pull requests to this contribution.
Posted on Utopian.io - Rewarding Open Source Contributors