auth.varo.domains Open in urlscan Pro
135.148.148.182  Public Scan

URL: https://auth.varo.domains/implement
Submission: On December 11 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

varo
Handshake Authentication


1. ADD VARO AUTH TO YOUR SITE

<script type="text/javascript" src="https://auth.varo.domains/v1"></script>


2. LOAD THE VARO CLASS

var varo = new Varo();


3. CALL THE AUTH METHOD

varo.auth().then(auth => {
	if (auth.success) {
		// handle success by calling your api to update the users session
		$.post("/auth", JSON.stringify(auth.data), (response) => {
			window.location.reload();
		});
	}
});


AUTH RESPONSE EXAMPLE

{
	"data": {
		"request": "00000000000000000000000000000000",
		"id": "11111111111111111111111111111111",
		"name": "varo"
	},
	"success": true
}


EXAMPLE API FOR YOUR SESSIONS

<?php
	session_start();
	//  ^ make sure to add this line to all pages of your site

	$json = file_get_contents("php://input");
	$data = json_decode($json, true);

	$verify = file_get_contents("https://auth.varo.domains/verify/".$data["request"]);
	$decoded = @json_decode($verify, true)["data"];
	if (@$decoded["name"]) {
		$_SESSION["name"] = $decoded["name"];
	}
?>

Join us on our discord if you need some extra help with implementing
© 2022 Eskimo Software