1.0.0 • Published 5 years ago
scotts_auth_client v1.0.0
scotts_auth_client
Authentication for frontends
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