mljar / mercury

Convert Jupyter Notebooks to Web Apps

Home Page:https://RunMercury.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how can I get the username of the currently Mercury logged-in user

fightpf opened this issue · comments

Dear developers, how can I get the username of the currently Mercury logged-in user? I have already enabled user authentication following the guidelines at https://runmercury.com/docs/authentication/ and have successfully added users. I would like to allow users to submit their completed to-do list for the day through a button and a dropdown menu in a Jupyter Notebook page using Mercury, and then save it as a CSV file.

#325
i see this issue, we can use following code to get loged-in user name and email:

app = mr.App(title="test", description="test")
mr.user()["email"]
mr.user()["username"]

Hi @fightpf,

Is it working fine for you?