all template files(home,login) #2

Merged
PeterSurda merged 1 commits from Services/part1 into main 2024-02-10 05:28:06 +01:00
Collaborator
No description provided.
shailaja requested review from swapnil 2024-02-08 11:05:50 +01:00
Collaborator

@PeterSurda this is what you wanted?

@PeterSurda this is what you wanted?
Owner

@PeterSurda this is what you wanted?

yes

> @PeterSurda this is what you wanted? yes
PeterSurda requested changes 2024-02-08 11:46:45 +01:00
@ -0,0 +6,4 @@
<title>Inoreader To Readwise</title>
</head>
<body>
<button onclick="redirectToOAuth()">Login using inoreader</button>
Owner

why not just have a <a href="{{auth_url}blablabla">Login via InoReader</a>? Then you don't need javascript.

why not just have a `<a href="{{auth_url}blablabla">Login via InoReader</a>`? Then you don't need javascript.
Collaborator

Why is JS a problem?

Why is JS a problem?
Owner

It’s an overkill. If you prefer a button, you can still do a form with hidden inputs.

It’s an overkill. If you prefer a button, you can still do a form with hidden inputs.
shailaja force-pushed Services/part1 from bc31779360 to 0de43c4c86 2024-02-09 08:01:47 +01:00 Compare
PeterSurda requested changes 2024-02-09 08:56:32 +01:00
PeterSurda left a comment
Owner

It's unfinished.

It's unfinished.
Collaborator

@shailaja You forgot to remove the script part in the template. JS script is no more required as we'll send the created oauth_url from python code.

@shailaja You forgot to remove the script part in the template. JS script is no more required as we'll send the created oauth_url from python code.
Owner

@shailaja You forgot to remove the script part in the template.

Yes that's part of what I meant.

JS script is no more required as we'll send the created oauth_url from python code.

Or, you can use a button and hidden form input fields, or you can do the string concatenation of the URL in Jinja2. But in any case don't forget to escape the values, either in python or in jinja2 (e.g. see here: https://stackoverflow.com/questions/1556554/how-do-i-html-escape-dangerous-unsanitized-input-in-jinja2)

> @shailaja You forgot to remove the script part in the template. Yes that's part of what I meant. > JS script is no more required as we'll send the created oauth_url from python code. Or, you can use a button and hidden form input fields, or you can do the string concatenation of the URL in Jinja2. But in any case don't forget to escape the values, either in python or in jinja2 (e.g. see here: https://stackoverflow.com/questions/1556554/how-do-i-html-escape-dangerous-unsanitized-input-in-jinja2)
Owner

I think that the form with a button and hidden input fields is the cleanest, but my instinct tells me that it's too fancy: too fancy

I think that the form with a button and hidden input fields is the cleanest, but my instinct tells me that it's too fancy: ![too fancy](https://i.imgflip.com/4uoes3.jpg)
Collaborator

A simple href with already constructed url looks a good suggestion to me.

A simple href with already constructed url looks a good suggestion to me.
shailaja force-pushed Services/part1 from 9448f1b7f9 to 02e7cd4be4 2024-02-09 09:56:36 +01:00 Compare
PeterSurda approved these changes 2024-02-10 05:27:51 +01:00
PeterSurda merged commit 02e7cd4be4 into main 2024-02-10 05:28:06 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PeterSurda/inoreader2readwise#2
No description provided.