|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>FairEmail - OAuth</title>
|
|
|
|
<link rel="shortcut icon" href="https://raw.githubusercontent.com/M66B/FairEmail/master/app/src/main/ic_launcher-web.png">
|
|
|
|
<meta name="theme-color" content="#006db3">
|
|
|
|
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
|
|
|
<meta name="description" content="FairEmail - OAuth">
|
|
|
|
<meta name="author" content="M66B">
|
|
|
|
<meta name="robots" content="noindex">
|
|
|
|
<style>
|
|
|
|
* { font-family: Arial, Helvetica, sans-serif; }
|
|
|
|
body { padding-left: 10px; padding-right: 10px; }
|
|
|
|
.error { color: red; font-weight: bold; }
|
|
|
|
.button-large { width: 120px; height: 30px; font-weight: bold; }
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
window.addEventListener('load', load);
|
|
|
|
|
|
|
|
function load() {
|
|
|
|
document.getElementById('oauth').addEventListener('click', oauth);
|
|
|
|
document.getElementById('year').textContent = new Date().getFullYear();
|
|
|
|
|
|
|
|
try {
|
|
|
|
var url = new URL(window.location.href);
|
|
|
|
var error = url.searchParams.get('error');
|
|
|
|
if (error) {
|
|
|
|
document.getElementById('errmsg').innerText = error;
|
|
|
|
document.getElementById('error').style.display = 'block';
|
|
|
|
}
|
|
|
|
} catch (error) {
|
|
|
|
console.error(error);
|
|
|
|
}
|
|
|
|
|
|
|
|
document.getElementById('debug').innerText = window.location.search;
|
|
|
|
document.getElementById('debug').style.display = 'none';
|
|
|
|
}
|
|
|
|
|
|
|
|
function oauth() {
|
|
|
|
document.location.href = 'eu.faircode.email://oauth' + window.location.search;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>FairEmail</h1>
|
|
|
|
<p><img src="https://raw.githubusercontent.com/M66B/FairEmail/master/app/src/main/ic_launcher-web.png" alt="FairEmail" height="72" width="72"></p>
|
|
|
|
<h2>🛡 OAuth</h2>
|
|
|
|
<p id="error" style="display: none;"><span>The email server said: <span id="errmsg" class="error"></span></span></p>
|
|
|
|
<p><button id="oauth" class="button-large">Continue</button> to the app</p>
|
|
|
|
<p id="debug" style="display: none; font-size: x-small;"></p>
|
|
|
|
<noscript><h2>Please enable JavaScript or disable your ad blocker</h2></noscript>
|
|
|
|
<br>
|
|
|
|
<p style="font-size: smaller;"><a href="https://en.wikipedia.org/wiki/OAuth" target="_blank">What is OAuth?</a></p>
|
|
|
|
<p><a href="https://github.com/M66B/open-source-email/blob/master/PRIVACY.md" target="_blank">Privacy policy</a></p>
|
|
|
|
<p>Copyright © 2018–<span id="year">2022</span> by Marcel Bokhorst (M66B)</p>
|
|
|
|
<p style="font-size: smaller;">This page is <a href="https://github.com/M66B/FairEmail/blob/master/oauth/index.html" target="_blank">open source</a>.</p>
|
|
|
|
</body>
|
|
|
|
</html>
|