# Got ID Token Using Server-Side Auth0 on Node.js - But Now What?

**URL:** <https://community.auth0.com/t/got-id-token-using-server-side-auth0-on-node-js-but-now-what/54705>\
**Category:** Get Help\
**Tags:** jwt\
**Created:** [December 11, 2020, 4:02pm UTC](https://community.auth0.com/t/got-id-token-using-server-side-auth0-on-node-js-but-now-what/54705 "2020-12-11T16:02:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![omarthor](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/omarthor/32/26210_2.png) [@omarthor](https://community.auth0.com/u/omarthor)\
**Post date:** [December 11, 2020, 4:02pm UTC](https://community.auth0.com/t/got-id-token-using-server-side-auth0-on-node-js-but-now-what/54705/1 "2020-12-11T16:02:42Z")

</div>

Hi, I’ve (nearly) successfully implemented a passwordless auth flow on Auth0 but am stuck at what I hope is the final step.

I’m using a server-side solution because I have a custom auth flow, where the passwordless email code is only sent if the email in question satisfies some conditions in Salesforce (I’ve already completed this part - this is just for context regarding why I am doing it this way).

As such, I’m doing this in Node.js using the `import {AuthenticationClient} from 'auth0'` on Node.js (it’s a Next.js app but this is a serverless API function).

My code (once I post the email and verification code from the user after email was previously validated in Salesforce):

```auto
import {AuthenticationClient} from 'auth0'

const loginAuth0 = (code,email) => {

  

  const auth0Options = {

    domain: process.env.AUTH0_DOMAIN,

    clientId: process.env.AUTH0_CLIENT_ID,

    clientSecret: process.env.AUTH0_CLIENT_SECRET

  }

  

  const auth0 = new AuthenticationClient(auth0Options)

  

  return auth0.passwordless.signIn({otp:code,realm:'email',username:email}, function (err,message){

      if (err) {

        console.log("Auth0 Error", err)

      }

      if(message){

        console.log("Auth0 Message", message)

      }

  })  

} 

```

What I get back is something like this:

```auto
 access_token: 'tc6bBBz4YcDQQfhTHN0DGLBCd1aGcXNM',
  id_token: 'eyJhbGciOiJSUzI1N...',
  scope: 'openid profile email address phone',
  expires_in: 86400,
  token_type: 'Bearer'

```

This to me looks like a JWT, but I’m still server side here. If I want to return this to the client and have them use this JWT (the ID token I believe) to then validate the token and access protected routes on the client, then how do I do that? Basically, what do I do with this token I’ve gotten from the code above from the Node lib? I know Auth0 has a SPA SDK and other tools, but I don’t see a way to start a “session” for the client when I already have the id token, especially because a lot of those libs or SDKs seem to assume a workflow, such as Universal instead of the way I’m doing it here. Do I need to validate manually with something from here - [https://jwt.io/](https://jwt.io/)? When I paste my `id_token` in here it says it is valid, so that seems fine, but how about token storage? If I’m not using the SDK because of how I’ve gotten the token, it seems I may run into problems with [storing the token securely](https://community.auth0.com/t/how-does-auth0-spa-js-store-tokens/30284). Any pointers here would be great, thanks so much!
