Generate tokens

hi,
could you please guide me how can I generate tokens like you did in Mozilla IOT ?
how and from where are they generated?

1 Like

Go to Settings / Developer / Create Local Authorisation

Note that once you generate the token, you must record the token somewhere, as currently there is no way to get back to it.

thanks but I meant that I wanted to know the logic of generating tokens in your program.programmatically how did you write the code?
or just tell me what are these tokens made from.I was just curios and interested to know it’s logic.

Hello again Mahsa :slight_smile:

I think the bit you’re interested in is gateway/src/models/jsonwebtokens.js.

They a JSON Web Tokens if you are interested in standard and documentation you can visit jwt.io.

3 Likes