Login widget creates connection to Port app (using QR code, magnet link or simple copy-paste function). View demo.
Browser link for Port apps is a simple HTML widget (lightweight) - no additional packages needed. It runs in browser.
Create dynamic link with one of four options on the Firebase platform. You don't need to create an entire dynamic link, only a dynamic_link URL is required. Other parameters are created by script in this repository.
-
Copy two files 'js/browser-link-for-port-apps.js' and 'css/browser-link-for-port-apps.css' to your project.
-
Include .js file into your header:
<script src="<path>/browser-link-for-port-apps.js"></script>
- Include .css file into your header:
Create dynamic link with one of four options on Firebase platform. You dont need to create entire dynamic link, only dynamic_link url is required. Other parametes is created by script in this repository.
Include JavaScript files to the project:
<script src="js/login.js"></script>
Create div section; where widget will be presented:
<div class="divqr">
<section id="zeropass-port-qr"></section>
</div>
Call the render script:
<script>
ZeroPassPortWidget.render(callbackFunction
{
userID: "<user_id>",
version: 0.2,
requestType: "<request_type in int>", //only ATTESTATION_REQUEST = 1, PERSONAL_INFORMATION_REQUEST = 2, FAKE_PERSONAL_INFORMATION_REQUEST = 3, LOGIN = 4 allowed
url: "<url without https://, if start with dot it adds .port.link>"
},
document.querySelector('#zeropass-port-qr'));
</script>
Check example in index.html file
QR window design inspired by Anchor Link