Coinbase bitcoin applications
Bitcoin is the hottest topic in the tech world as we approach Although I use Angular for the frontend, all of the heavy lifting occurs in the backend NodeJS Cloud Function environment, so all the backend code can be used for any client side framework. Full source code for the Firebase Coinbase. Signup for Coinbase and generate a new app. For this demo, the redirect URI is localhost: After that, you will need to install AngularFire by following the instructions on the official repo.
Your app module should look something like coinbase bitcoin applications. TypeScript must be used for this code to coinbase bitcoin applications because Firebase uses Node v6. If migrating an existing project, you can follow the TypesScript Cloud Functions guide. It is going to make our life way easier when we start dealing async functions.
We will also need crypto and coinbase bitcoin applications installed as well. The service account holds sensitive API keys - coinbase bitcoin applications sure to keep it out of any clientside code and add it to your. The redirect function is the easy one. The token Cloud Function receives the auth code form Coinbase, which is then sent back to Coinbase from the server to generate an access token and refresh token - in other coinbase bitcoin applications, the user is logged in as a Coinbase user on our server.
This token coinbase bitcoin applications passed back to Angular where it can be used to log the user into our firebase-powered app. And now for our first async functions. Note about step 4. Coinbase uses refresh tokenswhich are used to regenerate a coinbase bitcoin applications access token they expire every 2 hours. What good would Coinbase auth be without the ability to make requests to the API to view and send crypto currency payments? I am interacting with the window object directly for the sake of simplicity, but it is only available in browser apps.
If building for mobile, you will need to use a different strategy. The simply unwraps the user observable. If defined, it shows the UID and gives the user the ability to retrieve their bitcoin wallet details.
Otherwise, it just shows the Login with Coinbase button. The auth redirect page is special because it should coinbase bitcoin applications be navigated to by Coinbase with a code query parameter. The component will parse the query param, then make an http request to the Cloud Function we created earlier. Now that we have a user base full or bitcoin millionaires, we need to give them some more ways to send, receive, and manage their crypto currencies.
The next lesson will expand on this foundation with coinbase bitcoin applications advanced Coinbase integrations. Let me know if you have any questions in the comments or reach out on Slack. Search Lessons, Code Snippets, and Videos.
After three rounds of interview coinbase bitcoin applications decided not to move forward with me. This is a jobs program. If you like your exchanges humorless and corporate, use Bitfinex.