# Expires\_at and id\_token undefined (Lock 10 authentication)

**URL:** <https://community.auth0.com/t/expires-at-and-id-token-undefined-lock-10-authentication/8275>\
**Category:** Get Help\
**Tags:** lock-10, expiration, id\_token\
**Created:** [September 22, 2017, 9:53am UTC](https://community.auth0.com/t/expires-at-and-id-token-undefined-lock-10-authentication/8275 "2017-09-22T09:53:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alek](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@alek](https://community.auth0.com/u/alek)\
**Post date:** [September 22, 2017, 9:53am UTC](https://community.auth0.com/t/expires-at-and-id-token-undefined-lock-10-authentication/8275/1 "2017-09-22T09:53:18Z")

</div>

I have followed the examples and successfully used Lock 10 with the following configuration:

```
const options = {
  closable: false,
  theme: {
    logo: 'xx',
    primaryColor: 'xx',
  },
  languageDictionary: {
    title: 'xx',
  },
  auth: {
    params: {
      scope: 'openid profile email',
      audience: `www.xx.com`,
    },
  },
  responseType: 'token',
};

const lock = new Auth0Lock(
  env.auth0Config.clientId,
  env.auth0Config.domain,
  options,
);

```

when `.on("authenticated")` fires, the `authResult` does not have an `expires_at` or `id_token`, which I need to check whether or not a user is authenticated (or expired) next time they return to the site.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [September 29, 2017, 9:32pm UTC](https://community.auth0.com/t/expires-at-and-id-token-undefined-lock-10-authentication/8275/2 "2017-09-29T21:32:04Z")

</div>

There are a couple of things worth mentioning here, to my knowledge, the `audience` parameter in Lock 10 latest also requires `oidcConformant` to be set to `true`. Given the latter is only formally supported in Lock 10.22 then if you really need this you need to ensure to use that version.

Having said that the `audience` parameter is also documented to be at the root of the `auth` object and not within the `params` object so technically that configuration even if updated with the OIDC toggle would not be correct.

In addition, to be according to the OIDC specification if you want an ID token to be returned as part of an implicit grant then you need to include `id_token` as a response type. At one point in time (aka the legacy flows) you could get away with just including `token` and an ID token would still get returned, however, you should not be depending on that.

In conclusion, if you want to use Lock embedded in your own client application instead of using the hosted login page (which is the ultimate recommended approach) then you need to read on the use of the `oidcConformant` [option in Lock](https://auth0.com/docs/libraries/lock/v10/customization#oidcconformant-boolean-) and [cross-origin authentication](https://auth0.com/docs/cross-origin-authentication). **Having done that don’t forget to also use `responseType: "token id_token"`**.

---

<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:56am UTC](https://community.auth0.com/t/expires-at-and-id-token-undefined-lock-10-authentication/8275/3 "2018-03-02T05:56:38Z")

</div>


