stitchz-client
v1.0.1
Published
Stitchz.net javascript client to include in npm (node.js, commonjs, etc.) solutions
Downloads
12
Maintainers
Readme
stitchz-client
The Stitchz.net client for use on front end web login pages.
Install
$ npm install stitchz-clientUsage / Examples
In a reactJS application, on your login page...
componentDidMount() {
StitchzClient.ready(() => {
StitchzClient.AddIframeToDOM({
ApiKey: '00112233445566778899',
ReturnUrl: 'http://localhost:3000/oauth/authorize',
Height: '280', // optional
Width: '330', // optional
MaxHeight: '768', // optional
MaxWidth: '500', // optional
AutoResize: true, // optional
AppURL: 'https://example.stitchz.net',
Version: 2,
HtmlElementIdNameToAddIframeTo: 'stitchzsociallogin'
});
});
} // componentDidMountTo directly add the client to html code...
<div id="stitchzsociallogin">
</div>
<script src="/Scripts/stitchz.client.js" type="text/javascript"></script>
<script type="text/javascript">
StitchzClient.ready(function (e) {
StitchzClient.AddIframeToDOM({
ApiKey: '00112233445566778899',
ReturnUrl: 'http://localhost:3000/oauth/authorize',
Height: '280', // optional
Width: '330', // optional
MaxHeight: '768', // optional
MaxWidth: '500', // optional
AutoResize: true, // optional
AppURL: 'https://example.stitchz.net',
Version: 2,
HtmlElementIdNameToAddIframeTo: 'stitchzsociallogin'
});
});
</script>Documentation
For more information about Stitchz, including available profile properties, visit our documentation page.
Author
License
This project is licensed under the MIT license. See the LICENSE file for more info.
Copyright (c) 2017-2018 Stitchz <https://www.stitchz.net/>
