1.0.0 • Published 5 years ago

scotts_auth_client v1.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

scotts_auth_client

Authentication for frontends

NPM JavaScript Style Guide

Install

npm install --save scotts_auth_client

Usage

import * as React from 'react'

import {ScottsAuthenticationRenderProp, AuthHook} from 'scotts_auth_client'

function example() {
    const {register, login ... } = AuthHook("http://exampe.com/graphql")
}

class Example extends React.Component {
  render () {
    return (
      <ScottsAuthenticationRenderProp serverUrl="http://example.com/graphql">
        {({register, login}) => (
            whatever
        )}
      </ScottsAuthenticationRenderProp>
    )
  }
}

License

MIT © OGNeutron

1.0.0

5 years ago