# ESA - mock with Mirage when using implicit grant authentication

**URL:** https://discuss.emberjs.com/t/esa-mock-with-mirage-when-using-implicit-grant-authentication/14424
**Category:** Testing
**Created:** [March 21, 2018, 9:03am UTC](https://discuss.emberjs.com/t/esa-mock-with-mirage-when-using-implicit-grant-authentication/14424 "2018-03-21T09:03:47Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)
#### Post date: [May 31, 2018, 3:25pm UTC](https://discuss.emberjs.com/t/esa-mock-with-mirage-when-using-implicit-grant-authentication/14424/5 "2018-05-31T15:25:14Z")

</div>

> Did you mean /config/environment.js ?

Yup sorry, typo. Would look something like this:

```auto
if (environment === 'mirage') {
  // enable mirage
  ENV['ember-cli-mirage'].enabled = true;
}

```

Just need to enable mirage. Could also turn on mirage logging (`ENV['ember-cli-mirage'].logging = true`) or whatever else you wanted.

> Where did you define this mixin ?

See “Create authenticated route mixin” in my answer [here](https://discuss.emberjs.com/t/how-to-use-esa-or-esat-to-authenticate-against-custom-provider/14142/5)

> Or are they just to be replaced by some fake values ?

Exactly, they can be anything since it’s all fake and mirage won’t be checking your token

---

_[View the full topic](https://discuss.emberjs.com/t/esa-mock-with-mirage-when-using-implicit-grant-authentication/14424)._
