Spaces:
Runtime error
Runtime error
Download app/auth.py from SpreadSheets600/PoraHobe: direct link, hf CLI and curl.
- Browser
- Download file 347 Bytes
-
https://huggingface.co/spaces/SpreadSheets600/PoraHobe/resolve/main/app/auth.py
- Command line
-
hf download hf://spaces/SpreadSheets600/PoraHobe/app/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/SpreadSheets600/PoraHobe/resolve/main/app/auth.py
347 Bytes
| from flask_dance.contrib.google import google | |
| from flask import redirect, url_for | |
| from functools import wraps | |
| def login_required(f): | |
| def decorated_function(*args, **kwargs): | |
| if not google.authorized: | |
| return redirect(url_for("google.login")) | |
| return f(*args, **kwargs) | |
| return decorated_function | |