Added "Switch user" functionality.
The user isn't logged out until the new user logs in. This allows you to click on "Log in as different user", hit the back button, and still be logged in.
This commit is contained in:
@@ -284,3 +284,12 @@ def fetch_blenderid_user() -> dict:
|
||||
|
||||
def setup_app(app, url_prefix):
|
||||
app.register_api_blueprint(blender_id, url_prefix=url_prefix)
|
||||
|
||||
|
||||
def switch_user_url(next_url: str) -> str:
|
||||
from urllib.parse import quote
|
||||
|
||||
base_url = '%s/switch' % blender_id_endpoint()
|
||||
if next_url:
|
||||
return '%s?next=%s' % (base_url, quote(next_url))
|
||||
return base_url
|
||||
|
Reference in New Issue
Block a user