Obtain username for shinyapps.io

143 views
Skip to first unread message

Robin Davies

unread,
Nov 28, 2016, 8:18:34 AM11/28/16
to shinyapps.io Users
Hi, I have seen this question a couple of times but I am still a bit unclear.  I would like to obtain the username and then take actions on this. For example, the user currently on the app is joebloggs so only show data that joebloggs is permitted to see.  Can one only get a username through Shiny Server Pro? I don't use Linux or Redhat so I am a bit stuck...

Joshua Spiewak

unread,
Nov 28, 2016, 10:05:03 AM11/28/16
to shinyapps.io Users
I would start with the shinyapps.io documentation first, and then follow it to the article on Shiny permissions.

If you have further questions about hosting your application on shinyapps.io, this would be the appropriate list.
If you have questions about Shiny itself, I would suggest following up on the shiny-discuss group.

Robin Davies

unread,
Dec 1, 2016, 8:14:47 AM12/1/16
to shinyapps.io Users
Thanks Joshua

That's the route I followed but I am still struggling.  The Shiny permissions documentation and other web searches only talks about extracting the session$user from a Linux/Redhat server.  I am wanting to extract the username from the person logged into www.shinyapps.io (or return a NULL if they are viewing my app as a guest).  I'm really hoping this feature is possible, otherwise my app is at a dead end.  Perhaps shinyapps have done this to protect the user's identity (security).  Alternatively, is it possible to determine if the user has logged in on shinyapps.io, I might be able to use this as a workaround?  If you have any other ideas on solving this, it would be greatly appreciated.

Regards

Andy Kipp

unread,
Dec 1, 2016, 11:18:49 AM12/1/16
to Robin Davies, shinyapps.io Users
Robin,

If you're running on shinyapps.io, and your application is set to private, when a person logs into your application the email address of the person who is logged in will be in session$user. We don't expose anything other then the email address. Again this is for private applications only.

Hope that helps,

-Andy

--
You received this message because you are subscribed to the Google Groups "shinyapps.io Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-users+unsubscribe@googlegroups.com.
To post to this group, send email to shinyapps-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/1bc98f5d-fe4c-4de0-a6a7-274b1c426a14%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Robin Davies

unread,
Dec 1, 2016, 2:01:47 PM12/1/16
to shinyapps.io Users, robind...@gmail.com
Gosh that looks promising.  I am currently tinkering with the free version.  I am assuming this feature is only available from the basic version up and not the starter version?


On Thursday, 1 December 2016 18:18:49 UTC+2, Andy Kipp wrote:
Robin,

If you're running on shinyapps.io, and your application is set to private, when a person logs into your application the email address of the person who is logged in will be in session$user. We don't expose anything other then the email address. Again this is for private applications only.

Hope that helps,

-Andy
On Thu, Dec 1, 2016 at 5:14 AM, Robin Davies <robind...@gmail.com> wrote:
Thanks Joshua

That's the route I followed but I am still struggling.  The Shiny permissions documentation and other web searches only talks about extracting the session$user from a Linux/Redhat server.  I am wanting to extract the username from the person logged into www.shinyapps.io (or return a NULL if they are viewing my app as a guest).  I'm really hoping this feature is possible, otherwise my app is at a dead end.  Perhaps shinyapps have done this to protect the user's identity (security).  Alternatively, is it possible to determine if the user has logged in on shinyapps.io, I might be able to use this as a workaround?  If you have any other ideas on solving this, it would be greatly appreciated.

Regards

On Monday, 28 November 2016 15:18:34 UTC+2, Robin Davies wrote:
Hi, I have seen this question a couple of times but I am still a bit unclear.  I would like to obtain the username and then take actions on this. For example, the user currently on the app is joebloggs so only show data that joebloggs is permitted to see.  Can one only get a username through Shiny Server Pro? I don't use Linux or Redhat so I am a bit stuck...

--
You received this message because you are subscribed to the Google Groups "shinyapps.io Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.

Andy Kipp

unread,
Dec 1, 2016, 2:13:28 PM12/1/16
to Robin Davies, shinyapps.io Users
Robin,

Private applications are available in the Standard plan and higher.

You can check out the different options on our website: http://www.shinyapps.io/#pricing

Best,
-Andy

To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-users+unsubscribe@googlegroups.com.
To post to this group, send email to shinyapps-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/0550a96d-c3e7-4d8d-b73d-da4aa482d624%40googlegroups.com.

David Ruvolo

unread,
Jan 13, 2017, 8:39:36 AM1/13/17
to shinyapps.io Users
Hi, 

I was looking for an answer to this questions for quite some time now, but I gave up and built a simple login screen for non-pro shiny apps (free version of shinyapps.io). I created a list of users (username, passwords, email address, and set the authorization level - user vs admin) in google sheets. Using the googlesheets package (auth, tokens, etc.), the list of users are fetched on app load and the app can load from there.

I'd be happy to post an example, but wanted to make sure I understood your question correctly.

Is this what you're looking for?

Best,

David
Reply all
Reply to author
Forward
0 new messages