# Authenticated Pages access question

**URL:** <https://community.weweb.io/t/authenticated-pages-access-question/1260>\
**Category:** How do I?\
**Created:** [October 9, 2022, 2:26pm UTC](https://community.weweb.io/t/authenticated-pages-access-question/1260 "2022-10-09T14:26:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsatl](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@hsatl](https://community.weweb.io/u/hsatl)\
**Post date:** [October 9, 2022, 2:26pm UTC](https://community.weweb.io/t/authenticated-pages-access-question/1260/1 "2022-10-09T14:26:09Z")

</div>

I am trying to figure out how to get the following behavior.

The web app has a login functionality and the rest of the pages are behind the login. I have enabled “Private Access” to authenticated users only. All the traditional functioning works well.

but let’s say a user is logged out and he/she refreshes the page they were on earlier. The app does not redirect the user to the login page. It simply shows the page with no data displayed (or some data displayed like nav bar etc.).

How can I redirect users to login page if auth token has expired. I probably missed some setting or a workflow.

Can anyone help?

I am thinking about Global workflow with an onload trigger. And it checks every time a page loads. But that is making the app a bit slow to load pages. Especially since we do not have page load animations, it makes it really frustrating for the users.

[@weweb-team](https://community.weweb.io/groups/weweb-team) if there are any built in functions, which I am not aware of, please let me know.

Probably a good feature to add including the page change animation 🙂

---

<div class="post-metadata">

**Author:** ![khairul](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@khairul](https://community.weweb.io/u/khairul)\
**Post date:** [October 10, 2022, 3:25am UTC](https://community.weweb.io/t/authenticated-pages-access-question/1260/2 "2022-10-10T03:25:18Z")

</div>

In the plugin sections, there should be a built in redirect workflow to redirect the user if they aren’t signed in, you need to fill that.

![Screenshot 2022-10-10 at 11.22.07 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/009a3a20968f8310ae0ed84980747c87ee2b5d11.png)

 ![Screenshot 2022-10-10 at 11.21.41 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/939fa3aac9c99c41ed3df2d184bd253c372ad2f0.png)

Then, you need to make sure you set the pages that need authentication a private access.

 ![Screenshot 2022-10-10 at 11.23.35 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/814e3aba7a5ca84f6cb85a1a0ebe62da5d332aff.png)

 ![Screenshot 2022-10-10 at 11.23.48 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7837d6f65827dc607edd29f85729a98348abdea8.png)

Let me know if that helps

---

<div class="post-metadata">

**Author:** ![hsatl](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@hsatl](https://community.weweb.io/u/hsatl)\
**Post date:** [October 10, 2022, 11:42am UTC](https://community.weweb.io/t/authenticated-pages-access-question/1260/3 "2022-10-10T11:42:57Z")

</div>

hi @khairul, I am using Xano and it is configured to redirect to login. When I am in preview mode, it works as intended. But in live app, it is not functioning similarly. I started wondering if I missed any settings.
