26 lines
921 B
HTML
26 lines
921 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Inoreader To Readwise</title>
|
|
</head>
|
|
<body>
|
|
<button onclick="redirectToOAuth()">Login using inoreader</button>
|
|
|
|
<script>
|
|
function redirectToOAuth() {
|
|
// Encode URL components using Jinja filters
|
|
var encodedRedirectUri = encodeURIComponent('{{ redirect_uri }}');
|
|
var encodedOptionalScopes = encodeURIComponent('{{ optional_scopes }}');
|
|
|
|
// Construct the URL using Jinja variables
|
|
var oauthUrl = `{{ auth_url }}?client_id={{ client_id }}&redirect_uri=${encodedRedirectUri}&response_type=code&scope=${encodedOptionalScopes}&state={{ csrf_protection_string }}`;
|
|
|
|
// Redirect to the constructed URL
|
|
window.location.href = oauthUrl;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|