# Authenticate user for standard pages and SPA using Lock

**URL:** <https://community.auth0.com/t/authenticate-user-for-standard-pages-and-spa-using-lock/7204>\
**Category:** Get Help\
**Tags:** spa, web\
**Created:** [June 22, 2017, 4:39pm UTC](https://community.auth0.com/t/authenticate-user-for-standard-pages-and-spa-using-lock/7204 "2017-06-22T16:39:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zatziky](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zatziky/32/10325_2.png) [@zatziky](https://community.auth0.com/u/zatziky)\
**Post date:** [June 22, 2017, 4:39pm UTC](https://community.auth0.com/t/authenticate-user-for-standard-pages-and-spa-using-lock/7204/1 "2017-06-22T16:39:52Z")

</div>

**Background**  
Hello,  
we have 2 roles for users

- ADMIN
- USER

We have a backend backend.app.com 2 applications for them:

- a single page app - user.app.com - admin.app.com - only for USER
- a [regular webapp](https://auth0.com/docs/quickstart/webapp) - only for ADMIN

We want to have only one Lock for these apps. Say you try to connect to admin.app.com or user.app.com you are redirected to the Lock widget on auth0.app.com.

**How I think it should work**  
The successful login will redirect us to backend.app.com from here, based whether it’s ADMIN or USER, we would route to the correct app.

**What is the problem, then?**  
How do we pass credentials to the frontend from the routing endpoint?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/authenticate-user-for-standard-pages-and-spa-using-lock/7204/2 "2018-03-02T05:54:52Z")

</div>


