url encoding with python #4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Services/part3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@shailaja Please include only the required changes.
Upon comparision I found that
oauth_url
and pass it.oauth_url
from within the flask. Instead you need to send theoauth_url
that you've created to thelogin.html
template viarender_template
method.af486e5b48
tocc2357622b
@shailaja changes looks fine now. Have you tested the app code with the latest changes?
@ -0,0 +41,4 @@
last_synced = datetime.fromtimestamp(token.get('updated_at')).strftime('%Y-%m-%d %H:%M:%S')
next_sync = datetime.fromtimestamp(token.get('updated_at') + token.get('expiration_seconds')).strftime('%Y-%m-%d %H:%M:%S')
return render_template('home.html', user_login=user_info.get('login'), user_email=user_info.get('email'), # for inoreader it's userName and userEmail
Format this part. Does not look very nice. Maybe pass each parameter on a different line.
yes ,but facing the same issue which is because of email
5a5d72aadc
to78ae2aa5f7
That's not a problem. That's something Github specific. I tested by logging in and it's working but I see the last
ino-app
docker image was built about 8 hrs ago. That image has the lastest changes, right?@shailaja I looked at the image and the latest code on the test server. The code on the test server does not match with the one in the PR. Could you test once on the latest code?
Let me know if you need my help.
@shailaja I tested the latest code in shailja_test branch on test2 server and found that it's working fine, meaning url is generated properly. Please update this PR to include latest changes.
549cbb97fa
toec1f855261
@PeterSurda this LGTM 👍
@ -0,0 +24,4 @@
app.secret_key = secret_key
# https://www.inoreader.com/oauth2/auth
AUTH_URL = 'https://github.com/login/oauth/authorize'
should point to inoreader, not github
@ -0,0 +28,4 @@
@app.route('/')
def home():
if is_logged_in():
this section can be extracted. I.e.
@ -0,0 +35,4 @@
resp_json = resp.json()
token = resp_json['token']
user_info = requests.get('https://api.github.com/user', headers={
should point to inoreader. Maybe define this URL as a constant?
@ -0,0 +94,4 @@
# TEST: Github OAuth - REMOVE
response = requests.post(
'https://github.com/login/oauth/access_token',
Use a constant
@ -0,0 +116,4 @@
# REPLACE user API call with inoreader API call
# https://www.inoreader.com/reader/api/0/user-info
user_info = requests.get('https://api.github.com/user', headers={
constant
@ -0,0 +185,4 @@
raise_for_status(token_by_email_resp)
if token_by_email_resp.status_code != 200:
response = requests.post(
Again extracting. Something like
3bc031606e
to7d5390289e
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Gitea.