Skip to content

Instantly share code, notes, and snippets.

@jpstrikesback
jpstrikesback / Readme.md
Created February 4, 2020 12:07 — forked from colllin/Readme.md
FaunaDB User Token Expiration (for ABAC)

Auth0 + FaunaDB ABAC integration: How to expire Fauna user secrets.

Fauna doesn't (yet?) provide guaranteed expiration/TTL for ABAC tokens, so we need to implement it ourselves if we care about it.

What's in the box?

3 javascript functions, each of which can be imported into your project or run from the command-line using node path/to/script.js arg1 arg2 ... argN:

  1. deploy-schema.js: a javascript function for creating supporting collections and indexes in your Fauna database.

Keybase proof

I hereby claim:

  • I am jpstrikesback on github.
  • I am superpatell (https://keybase.io/superpatell) on keybase.
  • I have a public key ASCFtDdIDsSwW1PawA_LccUnOsChtg839bntkbvid6TcEgo

To claim this, I am signing this object:

@jpstrikesback
jpstrikesback / Component.jsx
Last active April 20, 2019 03:15
RAD AsyncStorage Adapter
import * as React from 'react';
import {
View,
Text,
} from 'react-native';
import Gun from 'gun/gun';
import 'gun/lib/open';
import '../extensions/sea';
@jpstrikesback
jpstrikesback / hugeMistake.jsx
Created April 11, 2019 21:33
Better Looking Error
import React, { Component } from 'react';
import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native';
import Error from './win-error.png';
export class ErrorBoundary extends Component {
constructor(props) {
super(props);
this.state = {
error: false,
message: '',