Access token with Nuxt.js

Hi,

This is an awkward question.

I just changed my Prismic repository visibility to private and now I cannot seem to find where to define the access token in my Nuxt app.

I have looked at everything in the documentation but could not find the solution. Does someone know how this value needs to be set?

Your help will be appreciated :slight_smile:

Hi @jeremy.benzakein,
Now you can set your access token since the version 1.2.0 but you need to be careful with this, your access token will bleed in the build of Nuxt.
You just need to be aware of it but that works.
Hope it helps :wink:

@arnaud

Thanks for your quick reply :slight_smile:

I figured there would be a way to set the access token but I have not found it yet (maybe my initial question wasn’t clear).

How do you set the access token ? Or where can I start looking in order to find that ?

I updated the readme here: https://github.com/nuxt-community/prismic-module#quick-start

@alws

Thanks a lot ! I knew i was missing something obvious :sweat_smile:

Ahah don’t worry, It’s there for only a few days because of the security risk it represents that’s why Atinux judged that it shouldn’t be here.
Since I added a new feature in there, the routes thingy, then I allowed to provide any apiOptions to the Prismic client.
So now it’s up to you :slight_smile:

1 Like

Hi @alws,

I just noticed that the access token line is still present in README and I thought you might want to remove it since you said you would :slight_smile:

Hey Jeremy,

I think what Arnaud meant was that this is still possible, but not recommended. So I did a PR to change the READme to include a warning that using this option will cause the accessToken to bleed in to the build.

1 Like