Using AWS Cognito Load Balancer authentication: Clear session cookie

Hello,
I'm currently working on implementing a dashboard in shiny. Previously I've used bokeh and created infrastructure for running that on AWS. I've used Cognito and the AWS ALB to do the authentication. For simplicity, I'd like to re-use this setup. Now I wonder how I can log users out. This is done by expiring the session cookie and redirecting the user to the logout url. In bokeh I set up a /logout URL which would clear the cookie and redirect the user.

Can this be done with shiny as well? I've seen there is e.g. 'cognitoR' package, but I'd like to keep it simple for now.

Thanks!
Johannes

See also: https://docs.amazonaws.cn/en_us/elasticloadbalancing/latest/application/listener-authenticate-users.html#authentication-logout-timeout

1 Like

Hi,

I also have this problem although I haven't tried to solve it yet, I would be interested to here what you find. Is it possible to delete the session cookie from within shiny?

I setup cognitoR for now and it works well. As this is my first project in R/shiny (coming from python), I first will have to learn the basics.

This link that was shared on the cognitoR GitHub might contain some more interesting information.

Thanks, so you are no longer using AWS ALB?

I'm using both. I figured it cannot hurt if the LB verifies first and then cognitoR verifies a second time.