This example repository is part of a blog post on implementing API authentication with Buffalo and Firebase
$ mkdir -p $GOPATH/src/github.com/wung-s
$ cd $GOPATH/src/github.com/wung-s
$ git clone git@github.com:wung-s/buffalo-firebase-authentication.git firebase_authentication && cd firebase_authentication
Refer the blog for steps on how to get your Firebase private key. Copy and paste the downloaded file into the config/
directory
Create the .env
file from the example .env
file
$ cp .env.example .env
and replace the value for FB_SERVICE_AC_KEY
with the name of the Firebase private key json file
$ buffalo db create -a
$ buffalo dev
$ heroku create my-app-name
Note: Necessary only if you have NOT deployed to Heroku yet
$ heroku config:set GO_ENV=production --app=my-app-name
$ heroku config:set FB_SERVICE_AC_KEY=serviceAccountKey.json --app=my-app-name
$ heroku container:login
$ heroku container:push web