mirror of
https://github.com/PartTimeHarmacist/spool.git
synced 2025-07-18 07:57:19 +00:00
Added placeholder /oauth endpoint for testing purposes
This commit is contained in:
parent
b414061a78
commit
53e841e207
14
app.py
14
app.py
@ -1,4 +1,4 @@
|
||||
from flask import Flask
|
||||
from flask import Flask, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@ -8,5 +8,17 @@ def hello_world(): # put application's code here
|
||||
return "Welcome to the initial commit - there's nothing here right now..."
|
||||
|
||||
|
||||
@app.route('/oauth')
|
||||
def oauth_endpoint():
|
||||
returned_state = request.args.get('state')
|
||||
returned_code = request.args.get('code')
|
||||
returned_error = request.args.get('error')
|
||||
|
||||
if returned_error:
|
||||
return f"Oauth failed due to error: {returned_error}"
|
||||
|
||||
return f"Oauth Endpoint\nState: {returned_state}\nCode: {returned_code}"
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
|
Loading…
x
Reference in New Issue
Block a user