0. Firebase
This application requires you to have firebase setup, from there you specify at what location you want to store chat
import FireChat from '../fire-chat';
const chat = new Firechat(db.ref("chat"));
1. Register events
/** @jsx React.DOM */ | |
module.exports = function (options) { | |
return React.createClass( _.assign({}, options, { | |
_listeners: [], | |
listenTo: function (store, event, callback) { | |
this._listeners.push({ | |
store: store, | |
event: event, |
this.content = Autolinker.link( content, { | |
replaceFn: function (autolinker, match) { | |
switch (match.getType()) { | |
case 'url' : | |
if (match.url.match(/\.(jpeg|jpg|gif|png)$/) != null) { | |
image = match.url; | |
if (image.indexOf('http') !=0) { | |
image = 'http://'+image; | |
} | |
} else if (Modernizr.video && match.url.match(/\.(mp4|webm)$/) != null) { |
<View style={{flex:1}}> | |
<View style={{flex:1}}> | |
<Button><Text>Hi</Text></Button> | |
<ListItem><Text>Hi</Text></ListItem> | |
<Switch onChange={this.toggleState("switchVal")} value={this.state.switchVal}/> | |
<Checkbox onChange={this.toggleState("checkboxVal")} value={this.state.checkboxVal}/> | |
<Radio onChange={this.toggleState("radioVal")} value={this.state.radioVal}/> | |
<Loader/> | |
<TextInput |
const jwt = require('jsonwebtoken'); | |
const privateKey = 'secret'; | |
module.exports = function (req, res, next) { | |
const oldSend = res.json; | |
const token = req.headers.authorization; | |
var body = req.body; | |
//When returning json from a username+password request, return a signed token |
***0. Firebase*** | |
This application requires you to have firebase setup, from there you specify at what location you want to store chat | |
``` | |
import FireChat from '../fire-chat'; | |
const chat = new Firechat(db.ref("chat")); | |
``` | |
***1. Register events*** |
0. Firebase
This application requires you to have firebase setup, from there you specify at what location you want to store chat
import FireChat from '../fire-chat';
const chat = new Firechat(db.ref("chat"));
1. Register events
var loadMore = (ref, from, qty, reverse=false)=> { | |
var direction = reverse ? 'endAt' : 'startAt'; | |
return ref['direction'](null,from) | |
.limitToFirst(qty+1) | |
.once('value') | |
.then((snap)=>{ | |
var items = snap.val() || {}; | |
var res = {hasMore:false, items}; | |
delete items[from]; | |
res.hasMore = Object.keys(items).length == qty; |
const Animation = class extends Component { | |
displayName: 'Animation' | |
constructor (props, context) { | |
super(props, context); | |
this.state = { opacity: 1 }; | |
} | |
toggleFade = () => { | |
//toggle opacity |
We're always looking to improve this project, open source contribution is encouraged so long as they adhere to our guidelines.
The Solid State team will be monitoring for pull requests. When we get one, a member of team will test the work against our internal uses and sign off on the changes. From here, we'll either merge the pull request or provide feedback suggesting the next steps.
A couple things to keep in mind:
Set salt | |
- When | |
1: when the user logs in | |
2: When the user changes their secret word | |
- Process | |
This is the process of storeing the encrypted secret answer along with a salt. | |
At this point the previous secured local storage is wiped, storeing a combination of the secret word and salt along with a generated challenge. | |
If there is local storage data in memory at this point it is re-encrypted using the generated challenge and written to local storage. | |