# Can I use the JS SDK on my site to login and then use Express for the rest

**URL:** <https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412>\
**Category:** Get Help\
**Tags:** auth0, login\
**Created:** [December 7, 2021, 4:06pm UTC](https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412 "2021-12-07T16:06:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vnp01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vnp01/32/26551_2.png) [@vnp01](https://community.auth0.com/u/vnp01)\
**Post date:** [December 7, 2021, 4:06pm UTC](https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412/1 "2021-12-07T16:06:48Z")

</div>

This is regarding implementing authentication using Auth0 on our site that is powered by Express.  
So I looked at: [Auth0 Express SDK Quickstarts: Login](https://auth0.com/docs/quickstart/webapp/express) and saw that the login page is provided by default with the express-openid-connect and takes the user to the universal login page.  
But what I need to do is handle the authentication on my website using Lock or something on my page and then do the rest using Express.

Hope my question is clear. Please let me know if any more clarifications are needed.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 8, 2021, 6:58pm UTC](https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412/3 "2021-12-08T18:58:39Z")

</div>

Hi @vnp01,

Welcome to the Auth0 Community!

I understand that you’d like to use a combination of 2 SDKs with your application.

> [@vnp01](#):
>
> with the express-openid-connect and takes the user to the universal login page.  
> But what I need to do is handle the authentication on my website using Lock

First, I’d like to clarify that the Universal Login Page uses the [Auth0 Lock](https://auth0.com/docs/libraries/lock) under the hood. Given that, you’ll likely want to use the [Auth0 Express SDK Quickstarts: Login](https://auth0.com/docs/quickstart/webapp/express) to implement authentication onto your app.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/8/f8d567bc81a745eb7d83eb640c26dada471a5707.jpeg)

However, if you plan on having an embedded login in your app, then you’ll need to use the [Auth0 JS SDK](https://auth0.github.io/auth0.js/index.html).

You can learn more about the difference in our [Centralized Universal Login vs. Embedded Login](https://auth0.com/docs/login/universal-vs-embedded-login) documentation.

Please don’t hesitate to reach out if you have any further questions

Thank you.

---

<div class="post-metadata">

**Author:** ![vnp01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vnp01/32/26551_2.png) [@vnp01](https://community.auth0.com/u/vnp01)\
**Post date:** [December 9, 2021, 4:27pm UTC](https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412/4 "2021-12-09T16:27:42Z")

</div>

Hello @rueben.tiow Thanks for the reply!  
I just read through the links you provided.  
What I need to know is if we can customise the embedded login to work with the express JS SDK so that we can serve the login page on our domain but handle the rest on the backend with express.

I tried to look into the code for both express-openid-connect and lock but didn’t understand how it works.

Any help would be great!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 9, 2021, 8:11pm UTC](https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412/5 "2021-12-09T20:11:57Z")

</div>

Hi @vnp01,

Thank you for your response.

> [@vnp01](#):
>
> What I need to know is if we can customise the embedded login to work with the express JS SDK so that we can serve the login page on our domain but handle the rest on the backend with express.

Yes, you can use Auth0 JS SDK with the Express JS SDK if needed.

Please take a moment to review our [Embedded Login](https://auth0.com/docs/login/embedded-login) documentation which emphasizes that it’s preferred to use Embedded Login with Custom Domains to prevent cross-origin authentication issues. Bear in mind that Custom Domain is a paid feature.

I hope this answers your question.

Please let me know if there’s anything else I can do to help.

Thank you.

---

<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:** [December 29, 2021, 10:26am UTC](https://community.auth0.com/t/can-i-use-the-js-sdk-on-my-site-to-login-and-then-use-express-for-the-rest/74412/8 "2021-12-29T10:26:25Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
