How to use JWT in unity?

Hi all. I want to use of JWT in unity. There is a gitlab project that help me.

But I don’t know how to work with it. Actually I don’t know how to send data to the server first time and receive the user’s JWT to use it later.
In other word, I don’t know how to implement the first section of below Image in unity.
Can anybody help me please?

It’s more of a server question than Unity.
You will send a request to the server with for example the users mail (no JWT here). The server will then generate the JWT which you receive and save in Unity. In every other request you will send the JWT too and the server verifies that its valid.

An example PHP script:

<?php 
use \Firebase\JWT\JWT; //installed via Composer

function Get($mail){
	$token = array(
		'iss' => 'YourName',
		'exp' => time() + 3600,	//valid for 1h
		'iat' => time(),
		'eml' => $mail,	//own value
	);
	return JWT::encode($token, JWTKey); //they secret key only your server knows
}

function Verify($token, $mail){
	try{
		$userDecoded = JWT::decode($token, JWTKey, array('HS256'));
		if(!isset($userDecoded->eml) ||
		  strcmp($userDecoded->eml,$mail) != 0){
			http_response_code(417);
			exit;
		}else{
			return true;
		}
	}catch(\Exception $e){
		echo 'Caught exception: ',  $e->getMessage(), "

";
http_response_code(417);
exit;
}
}
?>

Best,

Thomas