Skip to content

Commit

Permalink
Restructure project using react-router & added basics for Twitch Auth
Browse files Browse the repository at this point in the history
  • Loading branch information
embiem committed Jul 1, 2017
1 parent 1288fc8 commit 975b496
Show file tree
Hide file tree
Showing 14 changed files with 1,055 additions and 319 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -24,3 +24,5 @@ yarn-error.log*
src/config.js

firebase-debug.log

functions/service-account.json
13 changes: 12 additions & 1 deletion README.md
@@ -1,8 +1,19 @@
A hobby project, which tries to implement a more comfortable & feature-rich chat app for Twitch.
A hobby project, which tries to implement a more comfortable & feature-rich chat app for Twitch.

This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
Its guide can be found [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).

## New Clone

Basically follow the steps here.

1. Create the ``src/config.js`` file with firebaseConfig & twitchConfig.
2. Create the `functions/service-account.json` file [Docs](https://firebase.google.com/docs/admin/setup#add_firebase_to_your_app)
3. Set the twitch clientId & clientSecret as GCloud env variables [Docs](https://github.com/firebase/functions-samples/tree/master/instagram-auth)
1. `firebase functions:config:set twitch.client_id="yourClientID" twitch.client_secret="yourClientSecret"`
2. for local dev, also set `firebase functions:config:set twitch.client_id_dev="yourClientDevID" twitch.client_secret_dev="yourClientDevSecret"`


## Table of Contents

- [Sending Feedback](#sending-feedback)
Expand Down
24 changes: 21 additions & 3 deletions database.rules.json
@@ -1,6 +1,24 @@
{
"rules": {
".read": "auth != null",
".write": "auth != null"
"messages": {
"$uid": {
".read": "auth.uid === $uid",
".write": "auth.uid === $uid"
}
},

"twitchAccessToken": {
"$uid": {
".read": "auth.uid === $uid",
".write": "auth.uid === $uid"
}
},

"twitchUserData": {
"$uid": {
".read": "auth.uid === $uid",
".write": "auth.uid === $uid"
}
}
}
}
}

0 comments on commit 975b496

Please sign in to comment.