.
This commit is contained in:
parent
6da23cb97d
commit
f3a096e8c1
|
@ -6,20 +6,8 @@
|
|||
<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>
|
||||
<!-- <button onclick="redirectToOAuth()">Login using inoreader</button> -->
|
||||
<a href="{{oauth_url}}">Login via InoReader</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue
Block a user