Returning auth extra information on launch
I have integrated a small demo with some login API but I want to store in the session state the username entered in that login.Is there a way to access it?def keycloak_auth(username, password):
    keycloak_openid = KeycloakOpenID(
        server_url="", client_id="", realm_name=""
    )
    # Get Token
    token = keycloak_openid.token(username, password)
    gr.Text(value=username, label="username")

    return token


demo.launch(auth=keycloak_auth, auth_message="Enter your credentials", enable_queue=True)
2023-11-15T14:50:14Z
I have the exact same need…
2023-11-15T15:14:44Z
Look atgr.State()andInterface State. This lets you store a state across pages per user.