question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fetch logged in user information

See original GitHub issue

Since we’re using HA’s new auth, it would be great to have access to the current logged in user within TileBoard. I’m thinking I could use the logged in user to determine what pages or layout I want to use (giving each tablet its own HA user). A means of logging out or switching the account would also be useful for troubleshooting/developing.

It looks like sending “auth/current_user” over the websocket will return the needed information. If it could be accessed in config.js under something like this.user that would be awesome.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rchlcommented, Nov 28, 2019

Some things have changed since the previous comment. Now the Api object will be exposed as this.api in your functions. So you will have to use this.api.getUser([callback]).

Also added an onReady function that you can define in your config (CONFIG.onReady) which is probably gonna be the best place to get the user data.

It will work as soon as #309 is merged.

1reaction
resoaicommented, Dec 30, 2018

It is not straightforward as API calls are made at later stage and are async.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django: Fetch logged in user information from database and ...
I've menaged to create a form that allow me to save my website user information in the database. Right ...
Read more >
How to fetch logged in user details - Skuid Community
I wanted to fetch logged in user details on click of button for first time and want to display an alert on click...
Read more >
How to get logged in user information in client script
I have a need to find out about logged in user field value on client script (on INC table). How can I get...
Read more >
Fetch username of logged-in app user | Help - Zoho Deluge
Overview. This deluge task is used to fetch the username of the logged-in user. Return. This task returns the username of the logged-in...
Read more >
Retrieving the current user that is logged in - OutSystems
Follow below steps. 1. Outsystems has built in function to get current logged in user id ( BuiltFunctions -> Roles -> GetUserId() )....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found