Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions ovos_config_assistant/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def oauth_callback(oauth_id):
params = dict(request.args)
code = params["code"]

data = JsonStorageXDG("ovos_oauth_apps")[oauth_id]
oauth_store = JsonStorageXDG("ovos_oauth_apps")
data = oauth_store[oauth_id]
client_id = data["client_id"]
client_secret = data["client_secret"]
token_endpoint = data["token_endpoint"]
Expand All @@ -43,13 +44,14 @@ def oauth_callback(oauth_id):
data=body,
auth=(client_id, client_secret),
).json()

with JsonStorageXDG("ovos_oauth") as db:
db.add_token(oauth_id, token_response)
print(oauth_id)
print(token_response)
Comment thread
NeonDaniel marked this conversation as resolved.
Outdated
data['token_response'] = token_response
oauth_store.store()
Comment thread
NeonDaniel marked this conversation as resolved.
Outdated

return params


def main(port=36535, debug=True):
app.run(port=port, debug=debug)
app.run(host='0.0.0.0', port=port, debug=debug)
Comment thread
NeonDaniel marked this conversation as resolved.
Outdated
# start_server(start, port=port, debug=debug)
3 changes: 2 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ ovos_utils
pywebio
cutecharts
oauthlib~=3.0
ovos_backend_client
ovos_backend_client
flask~=2.2