mirror of
https://github.com/kennethreitz/replit-py.git
synced 2026-06-05 23:10:18 +00:00
17 lines
304 B
Python
17 lines
304 B
Python
"""A basic example of repl auth."""
|
|
import simple
|
|
|
|
app = simple.App("app")
|
|
|
|
|
|
@app.route("/")
|
|
def index():
|
|
if simple.signed_in:
|
|
return "Hello " + simple.auth.name
|
|
else:
|
|
return simple.signin() # optionally: simple.sigin(title="My title")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run()
|